ncftp not looking into .netrc

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












7















I have this sort of stanza in my .netrc:



machine ftp.mydomain.com
login mylogin
password mypassword


and while I can successfully connect with ftp:



ftp ftp.mydomain.com


and passing credentials to ncftp:



ncftp -umylogin -pmypassword ftp.mydomain.com


I get this using only ncftp ftp.mydomain.com



NcFTP 3.2.4 (May 16, 2010) by Mike Gleason (http://www.NcFTP.com/contact/).
Connecting to xxx.xxx.0.140...
ProFTPD 1.3.1 Server (Debian) [::ffff:xxx.xxx.0.140]
Login incorrect.
Sleeping 20 seconds...









share|improve this question




























    7















    I have this sort of stanza in my .netrc:



    machine ftp.mydomain.com
    login mylogin
    password mypassword


    and while I can successfully connect with ftp:



    ftp ftp.mydomain.com


    and passing credentials to ncftp:



    ncftp -umylogin -pmypassword ftp.mydomain.com


    I get this using only ncftp ftp.mydomain.com



    NcFTP 3.2.4 (May 16, 2010) by Mike Gleason (http://www.NcFTP.com/contact/).
    Connecting to xxx.xxx.0.140...
    ProFTPD 1.3.1 Server (Debian) [::ffff:xxx.xxx.0.140]
    Login incorrect.
    Sleeping 20 seconds...









    share|improve this question


























      7












      7








      7








      I have this sort of stanza in my .netrc:



      machine ftp.mydomain.com
      login mylogin
      password mypassword


      and while I can successfully connect with ftp:



      ftp ftp.mydomain.com


      and passing credentials to ncftp:



      ncftp -umylogin -pmypassword ftp.mydomain.com


      I get this using only ncftp ftp.mydomain.com



      NcFTP 3.2.4 (May 16, 2010) by Mike Gleason (http://www.NcFTP.com/contact/).
      Connecting to xxx.xxx.0.140...
      ProFTPD 1.3.1 Server (Debian) [::ffff:xxx.xxx.0.140]
      Login incorrect.
      Sleeping 20 seconds...









      share|improve this question
















      I have this sort of stanza in my .netrc:



      machine ftp.mydomain.com
      login mylogin
      password mypassword


      and while I can successfully connect with ftp:



      ftp ftp.mydomain.com


      and passing credentials to ncftp:



      ncftp -umylogin -pmypassword ftp.mydomain.com


      I get this using only ncftp ftp.mydomain.com



      NcFTP 3.2.4 (May 16, 2010) by Mike Gleason (http://www.NcFTP.com/contact/).
      Connecting to xxx.xxx.0.140...
      ProFTPD 1.3.1 Server (Debian) [::ffff:xxx.xxx.0.140]
      Login incorrect.
      Sleeping 20 seconds...






      ncftp .netrc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 15 '18 at 0:09









      Jeff Schaller

      39.9k1054126




      39.9k1054126










      asked Jan 30 '13 at 17:28









      neurinoneurino

      1,22511322




      1,22511322




















          2 Answers
          2






          active

          oldest

          votes


















          4














          man ncftp states, that ncftp do not use .netrc file for storing preferences. See FILES section for details. Instead it use $HOME/.ncftp/ directory.
          Just connect to your server and use bookmark command for creating a record in $HOME/.ncftp/bookmarks file






          share|improve this answer

























          • I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

            – neurino
            Jan 30 '13 at 17:55











          • This man is very old, I guess. I could not find any mentions about netrc in change log

            – dchirikov
            Jan 30 '13 at 18:02


















          1














          This is rewrite of dchirikov's answer with links and a howto.



          Although old man pages seem to indicate it was once the case, It appears that ncftp has not supported the .netrc file for quite some time. The most recent, official man page makes no mention of it. I found a debian bug report from 2002 regarding the lack of support. The ncftp developer (Mike Gleason) responded with:




          The .netrc file has little to do with ncftpput's config file, which can
          contain exactly one set of login information. Proper parsing of a
          .netrc bloats the code without tangible benefit since you can't use it
          with ncftpput without editing it.




          I think it's safe to say that .netrc support was intentionally removed and won't be returning anytime soon.



          The ncftp way to achieve passwordless login/transfer is to make a bookmark. It's pretty straightforward:



          $ ncftp -u username ftp.example.com
          [...]
          Password requested by [host IP address] for user "username".

          User username okay, need password.

          Password:


          Then you enter the password and you are in. You should get the server's welcome text and:



          Restricted user logged in.
          Logged in to ftp.example.com.


          At the ncftp / > prompt, enter bookmark. You'll be prompted to give a name to the bookmark (the suggestion is a useful version of the host name, example in our example), and confirm that you want to save the password.



          If you quit ncftp and browse the file ~/.ncftp/bookmarks, you'll see a line for your host, with the bookmark name, the host name, the username, and the password. The password is saved in an encoded form, which is probably not totally secure, but at least more secure than plaintext as it is in the .netrc file.



          Now do:



          $ ncftp example
          [...]
          Restricted user logged in.
          Logged in to ftp.example.com.
          ncftp / >


          And there you are. The bookmarks are good for the put/get versions of ncftp too. For instance,



          $ ncftpput example destdir file


          Will put file on the server ftp.example.com in the directory destdir.






          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f63112%2fncftp-not-looking-into-netrc%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            man ncftp states, that ncftp do not use .netrc file for storing preferences. See FILES section for details. Instead it use $HOME/.ncftp/ directory.
            Just connect to your server and use bookmark command for creating a record in $HOME/.ncftp/bookmarks file






            share|improve this answer

























            • I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

              – neurino
              Jan 30 '13 at 17:55











            • This man is very old, I guess. I could not find any mentions about netrc in change log

              – dchirikov
              Jan 30 '13 at 18:02















            4














            man ncftp states, that ncftp do not use .netrc file for storing preferences. See FILES section for details. Instead it use $HOME/.ncftp/ directory.
            Just connect to your server and use bookmark command for creating a record in $HOME/.ncftp/bookmarks file






            share|improve this answer

























            • I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

              – neurino
              Jan 30 '13 at 17:55











            • This man is very old, I guess. I could not find any mentions about netrc in change log

              – dchirikov
              Jan 30 '13 at 18:02













            4












            4








            4







            man ncftp states, that ncftp do not use .netrc file for storing preferences. See FILES section for details. Instead it use $HOME/.ncftp/ directory.
            Just connect to your server and use bookmark command for creating a record in $HOME/.ncftp/bookmarks file






            share|improve this answer















            man ncftp states, that ncftp do not use .netrc file for storing preferences. See FILES section for details. Instead it use $HOME/.ncftp/ directory.
            Just connect to your server and use bookmark command for creating a record in $HOME/.ncftp/bookmarks file







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 30 '13 at 17:47

























            answered Jan 30 '13 at 17:42









            dchirikovdchirikov

            2,89811015




            2,89811015












            • I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

              – neurino
              Jan 30 '13 at 17:55











            • This man is very old, I guess. I could not find any mentions about netrc in change log

              – dchirikov
              Jan 30 '13 at 18:02

















            • I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

              – neurino
              Jan 30 '13 at 17:55











            • This man is very old, I guess. I could not find any mentions about netrc in change log

              – dchirikov
              Jan 30 '13 at 18:02
















            I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

            – neurino
            Jan 30 '13 at 17:55





            I relied on this doc I found online but it was wrong... However the bookmarks facility forces using at least once in interactive mode, not always what you want... Thanks

            – neurino
            Jan 30 '13 at 17:55













            This man is very old, I guess. I could not find any mentions about netrc in change log

            – dchirikov
            Jan 30 '13 at 18:02





            This man is very old, I guess. I could not find any mentions about netrc in change log

            – dchirikov
            Jan 30 '13 at 18:02













            1














            This is rewrite of dchirikov's answer with links and a howto.



            Although old man pages seem to indicate it was once the case, It appears that ncftp has not supported the .netrc file for quite some time. The most recent, official man page makes no mention of it. I found a debian bug report from 2002 regarding the lack of support. The ncftp developer (Mike Gleason) responded with:




            The .netrc file has little to do with ncftpput's config file, which can
            contain exactly one set of login information. Proper parsing of a
            .netrc bloats the code without tangible benefit since you can't use it
            with ncftpput without editing it.




            I think it's safe to say that .netrc support was intentionally removed and won't be returning anytime soon.



            The ncftp way to achieve passwordless login/transfer is to make a bookmark. It's pretty straightforward:



            $ ncftp -u username ftp.example.com
            [...]
            Password requested by [host IP address] for user "username".

            User username okay, need password.

            Password:


            Then you enter the password and you are in. You should get the server's welcome text and:



            Restricted user logged in.
            Logged in to ftp.example.com.


            At the ncftp / > prompt, enter bookmark. You'll be prompted to give a name to the bookmark (the suggestion is a useful version of the host name, example in our example), and confirm that you want to save the password.



            If you quit ncftp and browse the file ~/.ncftp/bookmarks, you'll see a line for your host, with the bookmark name, the host name, the username, and the password. The password is saved in an encoded form, which is probably not totally secure, but at least more secure than plaintext as it is in the .netrc file.



            Now do:



            $ ncftp example
            [...]
            Restricted user logged in.
            Logged in to ftp.example.com.
            ncftp / >


            And there you are. The bookmarks are good for the put/get versions of ncftp too. For instance,



            $ ncftpput example destdir file


            Will put file on the server ftp.example.com in the directory destdir.






            share|improve this answer



























              1














              This is rewrite of dchirikov's answer with links and a howto.



              Although old man pages seem to indicate it was once the case, It appears that ncftp has not supported the .netrc file for quite some time. The most recent, official man page makes no mention of it. I found a debian bug report from 2002 regarding the lack of support. The ncftp developer (Mike Gleason) responded with:




              The .netrc file has little to do with ncftpput's config file, which can
              contain exactly one set of login information. Proper parsing of a
              .netrc bloats the code without tangible benefit since you can't use it
              with ncftpput without editing it.




              I think it's safe to say that .netrc support was intentionally removed and won't be returning anytime soon.



              The ncftp way to achieve passwordless login/transfer is to make a bookmark. It's pretty straightforward:



              $ ncftp -u username ftp.example.com
              [...]
              Password requested by [host IP address] for user "username".

              User username okay, need password.

              Password:


              Then you enter the password and you are in. You should get the server's welcome text and:



              Restricted user logged in.
              Logged in to ftp.example.com.


              At the ncftp / > prompt, enter bookmark. You'll be prompted to give a name to the bookmark (the suggestion is a useful version of the host name, example in our example), and confirm that you want to save the password.



              If you quit ncftp and browse the file ~/.ncftp/bookmarks, you'll see a line for your host, with the bookmark name, the host name, the username, and the password. The password is saved in an encoded form, which is probably not totally secure, but at least more secure than plaintext as it is in the .netrc file.



              Now do:



              $ ncftp example
              [...]
              Restricted user logged in.
              Logged in to ftp.example.com.
              ncftp / >


              And there you are. The bookmarks are good for the put/get versions of ncftp too. For instance,



              $ ncftpput example destdir file


              Will put file on the server ftp.example.com in the directory destdir.






              share|improve this answer

























                1












                1








                1







                This is rewrite of dchirikov's answer with links and a howto.



                Although old man pages seem to indicate it was once the case, It appears that ncftp has not supported the .netrc file for quite some time. The most recent, official man page makes no mention of it. I found a debian bug report from 2002 regarding the lack of support. The ncftp developer (Mike Gleason) responded with:




                The .netrc file has little to do with ncftpput's config file, which can
                contain exactly one set of login information. Proper parsing of a
                .netrc bloats the code without tangible benefit since you can't use it
                with ncftpput without editing it.




                I think it's safe to say that .netrc support was intentionally removed and won't be returning anytime soon.



                The ncftp way to achieve passwordless login/transfer is to make a bookmark. It's pretty straightforward:



                $ ncftp -u username ftp.example.com
                [...]
                Password requested by [host IP address] for user "username".

                User username okay, need password.

                Password:


                Then you enter the password and you are in. You should get the server's welcome text and:



                Restricted user logged in.
                Logged in to ftp.example.com.


                At the ncftp / > prompt, enter bookmark. You'll be prompted to give a name to the bookmark (the suggestion is a useful version of the host name, example in our example), and confirm that you want to save the password.



                If you quit ncftp and browse the file ~/.ncftp/bookmarks, you'll see a line for your host, with the bookmark name, the host name, the username, and the password. The password is saved in an encoded form, which is probably not totally secure, but at least more secure than plaintext as it is in the .netrc file.



                Now do:



                $ ncftp example
                [...]
                Restricted user logged in.
                Logged in to ftp.example.com.
                ncftp / >


                And there you are. The bookmarks are good for the put/get versions of ncftp too. For instance,



                $ ncftpput example destdir file


                Will put file on the server ftp.example.com in the directory destdir.






                share|improve this answer













                This is rewrite of dchirikov's answer with links and a howto.



                Although old man pages seem to indicate it was once the case, It appears that ncftp has not supported the .netrc file for quite some time. The most recent, official man page makes no mention of it. I found a debian bug report from 2002 regarding the lack of support. The ncftp developer (Mike Gleason) responded with:




                The .netrc file has little to do with ncftpput's config file, which can
                contain exactly one set of login information. Proper parsing of a
                .netrc bloats the code without tangible benefit since you can't use it
                with ncftpput without editing it.




                I think it's safe to say that .netrc support was intentionally removed and won't be returning anytime soon.



                The ncftp way to achieve passwordless login/transfer is to make a bookmark. It's pretty straightforward:



                $ ncftp -u username ftp.example.com
                [...]
                Password requested by [host IP address] for user "username".

                User username okay, need password.

                Password:


                Then you enter the password and you are in. You should get the server's welcome text and:



                Restricted user logged in.
                Logged in to ftp.example.com.


                At the ncftp / > prompt, enter bookmark. You'll be prompted to give a name to the bookmark (the suggestion is a useful version of the host name, example in our example), and confirm that you want to save the password.



                If you quit ncftp and browse the file ~/.ncftp/bookmarks, you'll see a line for your host, with the bookmark name, the host name, the username, and the password. The password is saved in an encoded form, which is probably not totally secure, but at least more secure than plaintext as it is in the .netrc file.



                Now do:



                $ ncftp example
                [...]
                Restricted user logged in.
                Logged in to ftp.example.com.
                ncftp / >


                And there you are. The bookmarks are good for the put/get versions of ncftp too. For instance,



                $ ncftpput example destdir file


                Will put file on the server ftp.example.com in the directory destdir.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 9 at 15:01









                Matthew LeingangMatthew Leingang

                1113




                1113



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f63112%2fncftp-not-looking-into-netrc%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay