How can you do a one liner with sftp to login with the password on the same line?How to put desired umask with SFTP?scp/sftp backup scriptHow do I set up an sftp user to login with a password to an EC2 ubuntu server?How to use openssh sftp command with a RSA/DSA key specified from the command lineProFTPd with sftp first login fails, seconds succeedsDebian squeeze: SSH login works fine, SFTP login returns a Failed password errorHow to open sftp connection and execute sftp command in the same shell commandsftp login issue with chrootSftp connection to work server fails with same settings on another computerUnable to SFTP with password authentication from outside localhost

LWC - Best practice for routing?

How is hair tissue mineral analysis performed?

What was the Shuttle Carrier Aircraft escape tunnel?

Why are < or > required to use /dev/tcp

Improving triangulation on AutoCAD-generated stl files

Why does the Saturn V have standalone inter-stage rings?

Can humans ever directly see a few photons at a time? Can a human see a single photon?

How to remove this component from PCB

How to draw this center trajectory of rolling ball?

Is it damaging to turn off a small fridge for two days every week?

Methodology: Writing unit tests for another developer

Can White Castle?

How large would a mega structure have to be to host 1 billion people indefinitely?

Greeting with "Ho"

What is "industrial ethernet"?

How does a blind passenger not die, if driver becomes unconscious

How many people are necessary to maintain modern civilisation?

Helping ease my back pain when I'm studying 13 hours everyday, even weekends

Is "Busen" just the area between the breasts?

Is this proposal by U.S. presidential candidate Pete Buttigieg to change the composition of the Supreme Court constitutional?

Why do textbooks often include the solutions to odd or even numbered problems but not both?

When to remove insignificant variables?

How to make clear to people I don't want to answer their "Where are you from?" question?

Java TreeMap.floorKey() equivalent for std::map



How can you do a one liner with sftp to login with the password on the same line?


How to put desired umask with SFTP?scp/sftp backup scriptHow do I set up an sftp user to login with a password to an EC2 ubuntu server?How to use openssh sftp command with a RSA/DSA key specified from the command lineProFTPd with sftp first login fails, seconds succeedsDebian squeeze: SSH login works fine, SFTP login returns a Failed password errorHow to open sftp connection and execute sftp command in the same shell commandsftp login issue with chrootSftp connection to work server fails with same settings on another computerUnable to SFTP with password authentication from outside localhost






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








14















Is there an option to put the password on the line as well with sftp?



linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ 


Like this



linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ -p PASSWORD? 









share|improve this question




























    14















    Is there an option to put the password on the line as well with sftp?



    linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ 


    Like this



    linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ -p PASSWORD? 









    share|improve this question
























      14












      14








      14


      4






      Is there an option to put the password on the line as well with sftp?



      linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ 


      Like this



      linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ -p PASSWORD? 









      share|improve this question














      Is there an option to put the password on the line as well with sftp?



      linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ 


      Like this



      linux~ $ sftp USERNAME@FTP.WEBSITE.COM:/DIRECTORY_TO_GO_TO/ -p PASSWORD? 






      sftp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 13 '09 at 19:27









      DanielDaniel

      1,77862433




      1,77862433




















          7 Answers
          7






          active

          oldest

          votes


















          12














          Generally including a password in a command line is considered a security risk because it will show up to anyone else who can run ps/top, and it may be saved in your shell's history.



          It would be a much better idea to setup key-based authentication if you are able.



          Also, I don't believe it is going to be possible with sftp. It is meant to be used for secure transfers. If you really had to do something like this and you have no other choice then you probably need to be looking at automating with expect.






          share|improve this answer























          • Interesting point!

            – Daniel
            Oct 13 '09 at 19:32











          • It would be a much better idea to setup key-based authentication if you are able. That's make sense.

            – Net Runner
            Jun 8 '17 at 17:48











          • This expect url is broken

            – André Perazzi
            Oct 31 '18 at 15:44











          • Can't understand why people upvote an answer that doesn't provide a solution.

            – itoctopus
            Jan 29 at 14:13


















          27














          As others have mentioned, a command-line password should be the last resort.



          However, if nothing else is possible; one can go for ssh pass



          sshpass -p <password> sftp user@host





          share|improve this answer


















          • 2





            This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

            – NetSquirrel
            Jul 5 '13 at 1:38











          • good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

            – oliver
            Apr 4 '17 at 9:22







          • 2





            This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

            – ebr
            Jun 8 '17 at 20:33


















          6














          Don't do that - setup SSH public key authentication for automatic login.






          share|improve this answer























          • Can sftp do this the same is scp?

            – Daniel
            Oct 13 '09 at 19:32






          • 1





            @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

            – Zoredache
            Oct 13 '09 at 23:19


















          4














          Just use perl, ruby or python to script what you are trying to do. In case of ruby it's just (taken from the net-sftp API docs):



          require 'net/sftp'

          Net::SFTP.start('host', 'username', :password => 'password') do |sftp|

          # upload a file or directory to the remote host

          sftp.upload!("/path/to/local", "/path/to/remote")

          end


          For more info http://net-ssh.rubyforge.org/sftp/v2/api/index.html






          share|improve this answer

























          • paramiko is pure python (no extra libs) and works really well

            – qwertzguy
            Oct 31 '12 at 10:52


















          3














          As the other answers have stated, use public key authentication. There is a great, although a little dated, IBM developerWorks series that should explain everything you want to know about it, as well as some useful supplemental tools such as keychain.






          share|improve this answer






























            1














            I suspect that there are as many answers as there are FTP clients. An SFTP server should not accept authentication information until encryption is established, so that the user and password are protected.



            I believe the FileZilla client will allow for command line passing of the user and password .. see the documentation here. Given the reputation of the FileZilla project, I would expect it to operate securely.






            share|improve this answer






























              1














              For searchers that don't care that the password can be seen in the command-line command:



              sftp userid:password@remoteHost is how to include the password in the sftp connect command.



              UPDATE: this turned out to be incorrect... see comments






              share|improve this answer

























              • OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                – ashnazg
                Dec 13 '18 at 15:06











              • This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                – ashnazg
                Dec 13 '18 at 15:25











              • Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                – P Satish Patro
                Jun 4 at 15:10













              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "2"
              ;
              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: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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%2fserverfault.com%2fquestions%2f74158%2fhow-can-you-do-a-one-liner-with-sftp-to-login-with-the-password-on-the-same-line%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              12














              Generally including a password in a command line is considered a security risk because it will show up to anyone else who can run ps/top, and it may be saved in your shell's history.



              It would be a much better idea to setup key-based authentication if you are able.



              Also, I don't believe it is going to be possible with sftp. It is meant to be used for secure transfers. If you really had to do something like this and you have no other choice then you probably need to be looking at automating with expect.






              share|improve this answer























              • Interesting point!

                – Daniel
                Oct 13 '09 at 19:32











              • It would be a much better idea to setup key-based authentication if you are able. That's make sense.

                – Net Runner
                Jun 8 '17 at 17:48











              • This expect url is broken

                – André Perazzi
                Oct 31 '18 at 15:44











              • Can't understand why people upvote an answer that doesn't provide a solution.

                – itoctopus
                Jan 29 at 14:13















              12














              Generally including a password in a command line is considered a security risk because it will show up to anyone else who can run ps/top, and it may be saved in your shell's history.



              It would be a much better idea to setup key-based authentication if you are able.



              Also, I don't believe it is going to be possible with sftp. It is meant to be used for secure transfers. If you really had to do something like this and you have no other choice then you probably need to be looking at automating with expect.






              share|improve this answer























              • Interesting point!

                – Daniel
                Oct 13 '09 at 19:32











              • It would be a much better idea to setup key-based authentication if you are able. That's make sense.

                – Net Runner
                Jun 8 '17 at 17:48











              • This expect url is broken

                – André Perazzi
                Oct 31 '18 at 15:44











              • Can't understand why people upvote an answer that doesn't provide a solution.

                – itoctopus
                Jan 29 at 14:13













              12












              12








              12







              Generally including a password in a command line is considered a security risk because it will show up to anyone else who can run ps/top, and it may be saved in your shell's history.



              It would be a much better idea to setup key-based authentication if you are able.



              Also, I don't believe it is going to be possible with sftp. It is meant to be used for secure transfers. If you really had to do something like this and you have no other choice then you probably need to be looking at automating with expect.






              share|improve this answer













              Generally including a password in a command line is considered a security risk because it will show up to anyone else who can run ps/top, and it may be saved in your shell's history.



              It would be a much better idea to setup key-based authentication if you are able.



              Also, I don't believe it is going to be possible with sftp. It is meant to be used for secure transfers. If you really had to do something like this and you have no other choice then you probably need to be looking at automating with expect.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Oct 13 '09 at 19:30









              ZoredacheZoredache

              113k31233380




              113k31233380












              • Interesting point!

                – Daniel
                Oct 13 '09 at 19:32











              • It would be a much better idea to setup key-based authentication if you are able. That's make sense.

                – Net Runner
                Jun 8 '17 at 17:48











              • This expect url is broken

                – André Perazzi
                Oct 31 '18 at 15:44











              • Can't understand why people upvote an answer that doesn't provide a solution.

                – itoctopus
                Jan 29 at 14:13

















              • Interesting point!

                – Daniel
                Oct 13 '09 at 19:32











              • It would be a much better idea to setup key-based authentication if you are able. That's make sense.

                – Net Runner
                Jun 8 '17 at 17:48











              • This expect url is broken

                – André Perazzi
                Oct 31 '18 at 15:44











              • Can't understand why people upvote an answer that doesn't provide a solution.

                – itoctopus
                Jan 29 at 14:13
















              Interesting point!

              – Daniel
              Oct 13 '09 at 19:32





              Interesting point!

              – Daniel
              Oct 13 '09 at 19:32













              It would be a much better idea to setup key-based authentication if you are able. That's make sense.

              – Net Runner
              Jun 8 '17 at 17:48





              It would be a much better idea to setup key-based authentication if you are able. That's make sense.

              – Net Runner
              Jun 8 '17 at 17:48













              This expect url is broken

              – André Perazzi
              Oct 31 '18 at 15:44





              This expect url is broken

              – André Perazzi
              Oct 31 '18 at 15:44













              Can't understand why people upvote an answer that doesn't provide a solution.

              – itoctopus
              Jan 29 at 14:13





              Can't understand why people upvote an answer that doesn't provide a solution.

              – itoctopus
              Jan 29 at 14:13













              27














              As others have mentioned, a command-line password should be the last resort.



              However, if nothing else is possible; one can go for ssh pass



              sshpass -p <password> sftp user@host





              share|improve this answer


















              • 2





                This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

                – NetSquirrel
                Jul 5 '13 at 1:38











              • good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

                – oliver
                Apr 4 '17 at 9:22







              • 2





                This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

                – ebr
                Jun 8 '17 at 20:33















              27














              As others have mentioned, a command-line password should be the last resort.



              However, if nothing else is possible; one can go for ssh pass



              sshpass -p <password> sftp user@host





              share|improve this answer


















              • 2





                This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

                – NetSquirrel
                Jul 5 '13 at 1:38











              • good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

                – oliver
                Apr 4 '17 at 9:22







              • 2





                This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

                – ebr
                Jun 8 '17 at 20:33













              27












              27








              27







              As others have mentioned, a command-line password should be the last resort.



              However, if nothing else is possible; one can go for ssh pass



              sshpass -p <password> sftp user@host





              share|improve this answer













              As others have mentioned, a command-line password should be the last resort.



              However, if nothing else is possible; one can go for ssh pass



              sshpass -p <password> sftp user@host






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 13 '13 at 20:15









              Yogesh NachnaniYogesh Nachnani

              371132




              371132







              • 2





                This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

                – NetSquirrel
                Jul 5 '13 at 1:38











              • good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

                – oliver
                Apr 4 '17 at 9:22







              • 2





                This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

                – ebr
                Jun 8 '17 at 20:33












              • 2





                This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

                – NetSquirrel
                Jul 5 '13 at 1:38











              • good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

                – oliver
                Apr 4 '17 at 9:22







              • 2





                This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

                – ebr
                Jun 8 '17 at 20:33







              2




              2





              This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

              – NetSquirrel
              Jul 5 '13 at 1:38





              This should be massively upvoted. It is really useful to have sshpass. Some providers don't allow you to create a .ssh folder and scp is also disallowed.

              – NetSquirrel
              Jul 5 '13 at 1:38













              good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

              – oliver
              Apr 4 '17 at 9:22






              good that some tools have your back: brew search sshpass -- "We won't add sshpass because it makes it too easy for novice SSH users to ruin SSH's security."

              – oliver
              Apr 4 '17 at 9:22





              2




              2





              This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

              – ebr
              Jun 8 '17 at 20:33





              This should be the accepted solution. The OP asked how to do this specific thing - not for security advice (albeit well-intentioned and correct).

              – ebr
              Jun 8 '17 at 20:33











              6














              Don't do that - setup SSH public key authentication for automatic login.






              share|improve this answer























              • Can sftp do this the same is scp?

                – Daniel
                Oct 13 '09 at 19:32






              • 1





                @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

                – Zoredache
                Oct 13 '09 at 23:19















              6














              Don't do that - setup SSH public key authentication for automatic login.






              share|improve this answer























              • Can sftp do this the same is scp?

                – Daniel
                Oct 13 '09 at 19:32






              • 1





                @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

                – Zoredache
                Oct 13 '09 at 23:19













              6












              6








              6







              Don't do that - setup SSH public key authentication for automatic login.






              share|improve this answer













              Don't do that - setup SSH public key authentication for automatic login.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Oct 13 '09 at 19:31









              MikeyBMikeyB

              33.5k785174




              33.5k785174












              • Can sftp do this the same is scp?

                – Daniel
                Oct 13 '09 at 19:32






              • 1





                @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

                – Zoredache
                Oct 13 '09 at 23:19

















              • Can sftp do this the same is scp?

                – Daniel
                Oct 13 '09 at 19:32






              • 1





                @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

                – Zoredache
                Oct 13 '09 at 23:19
















              Can sftp do this the same is scp?

              – Daniel
              Oct 13 '09 at 19:32





              Can sftp do this the same is scp?

              – Daniel
              Oct 13 '09 at 19:32




              1




              1





              @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

              – Zoredache
              Oct 13 '09 at 23:19





              @Daniel, both sftp and scp are built on SSH which allows for key-based authentication.

              – Zoredache
              Oct 13 '09 at 23:19











              4














              Just use perl, ruby or python to script what you are trying to do. In case of ruby it's just (taken from the net-sftp API docs):



              require 'net/sftp'

              Net::SFTP.start('host', 'username', :password => 'password') do |sftp|

              # upload a file or directory to the remote host

              sftp.upload!("/path/to/local", "/path/to/remote")

              end


              For more info http://net-ssh.rubyforge.org/sftp/v2/api/index.html






              share|improve this answer

























              • paramiko is pure python (no extra libs) and works really well

                – qwertzguy
                Oct 31 '12 at 10:52















              4














              Just use perl, ruby or python to script what you are trying to do. In case of ruby it's just (taken from the net-sftp API docs):



              require 'net/sftp'

              Net::SFTP.start('host', 'username', :password => 'password') do |sftp|

              # upload a file or directory to the remote host

              sftp.upload!("/path/to/local", "/path/to/remote")

              end


              For more info http://net-ssh.rubyforge.org/sftp/v2/api/index.html






              share|improve this answer

























              • paramiko is pure python (no extra libs) and works really well

                – qwertzguy
                Oct 31 '12 at 10:52













              4












              4








              4







              Just use perl, ruby or python to script what you are trying to do. In case of ruby it's just (taken from the net-sftp API docs):



              require 'net/sftp'

              Net::SFTP.start('host', 'username', :password => 'password') do |sftp|

              # upload a file or directory to the remote host

              sftp.upload!("/path/to/local", "/path/to/remote")

              end


              For more info http://net-ssh.rubyforge.org/sftp/v2/api/index.html






              share|improve this answer















              Just use perl, ruby or python to script what you are trying to do. In case of ruby it's just (taken from the net-sftp API docs):



              require 'net/sftp'

              Net::SFTP.start('host', 'username', :password => 'password') do |sftp|

              # upload a file or directory to the remote host

              sftp.upload!("/path/to/local", "/path/to/remote")

              end


              For more info http://net-ssh.rubyforge.org/sftp/v2/api/index.html







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 8 '17 at 17:44









              7ochem

              2761312




              2761312










              answered Oct 13 '09 at 19:53









              monomythmonomyth

              876159




              876159












              • paramiko is pure python (no extra libs) and works really well

                – qwertzguy
                Oct 31 '12 at 10:52

















              • paramiko is pure python (no extra libs) and works really well

                – qwertzguy
                Oct 31 '12 at 10:52
















              paramiko is pure python (no extra libs) and works really well

              – qwertzguy
              Oct 31 '12 at 10:52





              paramiko is pure python (no extra libs) and works really well

              – qwertzguy
              Oct 31 '12 at 10:52











              3














              As the other answers have stated, use public key authentication. There is a great, although a little dated, IBM developerWorks series that should explain everything you want to know about it, as well as some useful supplemental tools such as keychain.






              share|improve this answer



























                3














                As the other answers have stated, use public key authentication. There is a great, although a little dated, IBM developerWorks series that should explain everything you want to know about it, as well as some useful supplemental tools such as keychain.






                share|improve this answer

























                  3












                  3








                  3







                  As the other answers have stated, use public key authentication. There is a great, although a little dated, IBM developerWorks series that should explain everything you want to know about it, as well as some useful supplemental tools such as keychain.






                  share|improve this answer













                  As the other answers have stated, use public key authentication. There is a great, although a little dated, IBM developerWorks series that should explain everything you want to know about it, as well as some useful supplemental tools such as keychain.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 13 '09 at 19:59









                  rvfrvf

                  1,202109




                  1,202109





















                      1














                      I suspect that there are as many answers as there are FTP clients. An SFTP server should not accept authentication information until encryption is established, so that the user and password are protected.



                      I believe the FileZilla client will allow for command line passing of the user and password .. see the documentation here. Given the reputation of the FileZilla project, I would expect it to operate securely.






                      share|improve this answer



























                        1














                        I suspect that there are as many answers as there are FTP clients. An SFTP server should not accept authentication information until encryption is established, so that the user and password are protected.



                        I believe the FileZilla client will allow for command line passing of the user and password .. see the documentation here. Given the reputation of the FileZilla project, I would expect it to operate securely.






                        share|improve this answer

























                          1












                          1








                          1







                          I suspect that there are as many answers as there are FTP clients. An SFTP server should not accept authentication information until encryption is established, so that the user and password are protected.



                          I believe the FileZilla client will allow for command line passing of the user and password .. see the documentation here. Given the reputation of the FileZilla project, I would expect it to operate securely.






                          share|improve this answer













                          I suspect that there are as many answers as there are FTP clients. An SFTP server should not accept authentication information until encryption is established, so that the user and password are protected.



                          I believe the FileZilla client will allow for command line passing of the user and password .. see the documentation here. Given the reputation of the FileZilla project, I would expect it to operate securely.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 13 '09 at 19:58









                          tomjedrztomjedrz

                          5,74211223




                          5,74211223





















                              1














                              For searchers that don't care that the password can be seen in the command-line command:



                              sftp userid:password@remoteHost is how to include the password in the sftp connect command.



                              UPDATE: this turned out to be incorrect... see comments






                              share|improve this answer

























                              • OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                                – ashnazg
                                Dec 13 '18 at 15:06











                              • This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                                – ashnazg
                                Dec 13 '18 at 15:25











                              • Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                                – P Satish Patro
                                Jun 4 at 15:10















                              1














                              For searchers that don't care that the password can be seen in the command-line command:



                              sftp userid:password@remoteHost is how to include the password in the sftp connect command.



                              UPDATE: this turned out to be incorrect... see comments






                              share|improve this answer

























                              • OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                                – ashnazg
                                Dec 13 '18 at 15:06











                              • This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                                – ashnazg
                                Dec 13 '18 at 15:25











                              • Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                                – P Satish Patro
                                Jun 4 at 15:10













                              1












                              1








                              1







                              For searchers that don't care that the password can be seen in the command-line command:



                              sftp userid:password@remoteHost is how to include the password in the sftp connect command.



                              UPDATE: this turned out to be incorrect... see comments






                              share|improve this answer















                              For searchers that don't care that the password can be seen in the command-line command:



                              sftp userid:password@remoteHost is how to include the password in the sftp connect command.



                              UPDATE: this turned out to be incorrect... see comments







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jun 5 at 17:19

























                              answered Dec 12 '18 at 22:54









                              ashnazgashnazg

                              1113




                              1113












                              • OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                                – ashnazg
                                Dec 13 '18 at 15:06











                              • This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                                – ashnazg
                                Dec 13 '18 at 15:25











                              • Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                                – P Satish Patro
                                Jun 4 at 15:10

















                              • OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                                – ashnazg
                                Dec 13 '18 at 15:06











                              • This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                                – ashnazg
                                Dec 13 '18 at 15:25











                              • Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                                – P Satish Patro
                                Jun 4 at 15:10
















                              OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                              – ashnazg
                              Dec 13 '18 at 15:06





                              OpenSSH v5.3p1 and v4.3p2, both on Red Hat Enterprise...

                              – ashnazg
                              Dec 13 '18 at 15:06













                              This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                              – ashnazg
                              Dec 13 '18 at 15:25





                              This turned out to be incorrect... this method appeared to work for me because PHP and its ssh2 extension were being used earlier in my code to do actual standalone authentication... and the sftp command was being run later. It was this later piece where the syntax appeared to succeed.

                              – ashnazg
                              Dec 13 '18 at 15:25













                              Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                              – P Satish Patro
                              Jun 4 at 15:10





                              Could not resolve hostname user: No such host is known. It is considering ":" in username which is not the case in FileZilla CLI

                              – P Satish Patro
                              Jun 4 at 15:10

















                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Server Fault!


                              • 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%2fserverfault.com%2fquestions%2f74158%2fhow-can-you-do-a-one-liner-with-sftp-to-login-with-the-password-on-the-same-line%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

                              Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                              Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                              What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company