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;
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
add a comment |
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
add a comment |
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
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
sftp
asked Oct 13 '09 at 19:27
DanielDaniel
1,77862433
1,77862433
add a comment |
add a comment |
7 Answers
7
active
oldest
votes
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.
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
add a comment |
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
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
add a comment |
Don't do that - setup SSH public key authentication for automatic login.
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
add a comment |
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
paramiko is pure python (no extra libs) and works really well
– qwertzguy
Oct 31 '12 at 10:52
add a comment |
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.
add a comment |
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.
add a comment |
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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
Don't do that - setup SSH public key authentication for automatic login.
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
add a comment |
Don't do that - setup SSH public key authentication for automatic login.
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
add a comment |
Don't do that - setup SSH public key authentication for automatic login.
Don't do that - setup SSH public key authentication for automatic login.
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
add a comment |
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
add a comment |
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
paramiko is pure python (no extra libs) and works really well
– qwertzguy
Oct 31 '12 at 10:52
add a comment |
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
paramiko is pure python (no extra libs) and works really well
– qwertzguy
Oct 31 '12 at 10:52
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Oct 13 '09 at 19:59
rvfrvf
1,202109
1,202109
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Oct 13 '09 at 19:58
tomjedrztomjedrz
5,74211223
5,74211223
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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