Automate SFTP connection with both Password and PublicKey












0















I am trying to SFTP into a server hosted by someone else with both password and publicKey authentication enabled for it.



I tried connecting to it with



sftp -v  -i privateKeyPath user@serverip


But then it fails without even asking for password with following errors:



debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file privateKeyPath type -1
debug1: key_load_public: No such file or directory
debug1: identity file privateKey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:VzWrzE4sfQyGqhxLRK48o3EcUkMajTFdzo/JcSZ9bJg
debug1: Host 'serverip' is known and matches the RSA host key.
debug1: Found key in /home/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key: privateKeyPath
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey


Then I tried forcing password authentication first before publicKey



sftp -v -oPreferredAuthentications=password,publickey -i privateKeyPath user@serverip


and I am able to successfully connect with the server but had to enter same password thrice , due to this is there any way to automate this process avoid manual entry of password and that too thrice.



OpenSSH_7.4p1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /home/.ssh/config
debug1: /home/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey type -1
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:UyjhDdPiB4Fy0ut6nTZ5fZI6UpnXK6tke2dgizN1xys
debug1: checking without port identifier
Warning: Permanently added '[serverip]:22' (RSA) to the list of known hosts.
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key:privatekey
debug1: Authentication succeeded (publickey).
Authenticated to serverip ([serverip]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending subsystem: sftp
Connected to serverip.









share|improve this question

























  • Possible duplicate of Send Password in ssh script

    – Martin Prikryl
    Jan 3 at 7:19
















0















I am trying to SFTP into a server hosted by someone else with both password and publicKey authentication enabled for it.



I tried connecting to it with



sftp -v  -i privateKeyPath user@serverip


But then it fails without even asking for password with following errors:



debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file privateKeyPath type -1
debug1: key_load_public: No such file or directory
debug1: identity file privateKey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:VzWrzE4sfQyGqhxLRK48o3EcUkMajTFdzo/JcSZ9bJg
debug1: Host 'serverip' is known and matches the RSA host key.
debug1: Found key in /home/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key: privateKeyPath
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey


Then I tried forcing password authentication first before publicKey



sftp -v -oPreferredAuthentications=password,publickey -i privateKeyPath user@serverip


and I am able to successfully connect with the server but had to enter same password thrice , due to this is there any way to automate this process avoid manual entry of password and that too thrice.



OpenSSH_7.4p1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /home/.ssh/config
debug1: /home/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey type -1
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:UyjhDdPiB4Fy0ut6nTZ5fZI6UpnXK6tke2dgizN1xys
debug1: checking without port identifier
Warning: Permanently added '[serverip]:22' (RSA) to the list of known hosts.
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key:privatekey
debug1: Authentication succeeded (publickey).
Authenticated to serverip ([serverip]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending subsystem: sftp
Connected to serverip.









share|improve this question

























  • Possible duplicate of Send Password in ssh script

    – Martin Prikryl
    Jan 3 at 7:19














0












0








0


1






I am trying to SFTP into a server hosted by someone else with both password and publicKey authentication enabled for it.



I tried connecting to it with



sftp -v  -i privateKeyPath user@serverip


But then it fails without even asking for password with following errors:



debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file privateKeyPath type -1
debug1: key_load_public: No such file or directory
debug1: identity file privateKey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:VzWrzE4sfQyGqhxLRK48o3EcUkMajTFdzo/JcSZ9bJg
debug1: Host 'serverip' is known and matches the RSA host key.
debug1: Found key in /home/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key: privateKeyPath
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey


Then I tried forcing password authentication first before publicKey



sftp -v -oPreferredAuthentications=password,publickey -i privateKeyPath user@serverip


and I am able to successfully connect with the server but had to enter same password thrice , due to this is there any way to automate this process avoid manual entry of password and that too thrice.



OpenSSH_7.4p1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /home/.ssh/config
debug1: /home/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey type -1
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:UyjhDdPiB4Fy0ut6nTZ5fZI6UpnXK6tke2dgizN1xys
debug1: checking without port identifier
Warning: Permanently added '[serverip]:22' (RSA) to the list of known hosts.
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key:privatekey
debug1: Authentication succeeded (publickey).
Authenticated to serverip ([serverip]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending subsystem: sftp
Connected to serverip.









share|improve this question
















I am trying to SFTP into a server hosted by someone else with both password and publicKey authentication enabled for it.



I tried connecting to it with



sftp -v  -i privateKeyPath user@serverip


But then it fails without even asking for password with following errors:



debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file privateKeyPath type -1
debug1: key_load_public: No such file or directory
debug1: identity file privateKey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:VzWrzE4sfQyGqhxLRK48o3EcUkMajTFdzo/JcSZ9bJg
debug1: Host 'serverip' is known and matches the RSA host key.
debug1: Found key in /home/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key: privateKeyPath
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey


Then I tried forcing password authentication first before publicKey



sftp -v -oPreferredAuthentications=password,publickey -i privateKeyPath user@serverip


and I am able to successfully connect with the server but had to enter same password thrice , due to this is there any way to automate this process avoid manual entry of password and that too thrice.



OpenSSH_7.4p1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /home/.ssh/config
debug1: /home/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 59: Applying options for *
debug1: Connecting to serverip [serverip] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey type -1
debug1: key_load_public: No such file or directory
debug1: identity fileprivatekey-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version JSCAPE
debug1: no match: JSCAPE
debug1: Authenticating to serverip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: kex: diffie-hellman-group-exchange-sha256 need=32 dh_need=32
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:UyjhDdPiB4Fy0ut6nTZ5fZI6UpnXK6tke2dgizN1xys
debug1: checking without port identifier
Warning: Permanently added '[serverip]:22' (RSA) to the list of known hosts.
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
Permission denied, please try again.
user@serverip's password:
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Trying private key:privatekey
debug1: Authentication succeeded (publickey).
Authenticated to serverip ([serverip]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending subsystem: sftp
Connected to serverip.






ssh sftp authentication public-key-encryption






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 4:24









Scott

15.7k113990




15.7k113990










asked Jan 3 at 4:00









user118434user118434

1




1













  • Possible duplicate of Send Password in ssh script

    – Martin Prikryl
    Jan 3 at 7:19



















  • Possible duplicate of Send Password in ssh script

    – Martin Prikryl
    Jan 3 at 7:19

















Possible duplicate of Send Password in ssh script

– Martin Prikryl
Jan 3 at 7:19





Possible duplicate of Send Password in ssh script

– Martin Prikryl
Jan 3 at 7:19










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1390034%2fautomate-sftp-connection-with-both-password-and-publickey%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • 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%2fsuperuser.com%2fquestions%2f1390034%2fautomate-sftp-connection-with-both-password-and-publickey%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

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

RAC Tourist Trophy