Attempting to connect to remote server with SFTP but receiving a needless passphrase prompt

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I recently made the switch from Windows to Ubuntu for development and I have problems trying to setup a connection to a remote server.
On Windows, I use cyberduck to connect to a remote server through SFTP with an unprotected keyfile.
So now I am trying to sftp in with the command line doing this:
sudo sftp -o IdentityFile=< location of my keyfile > < myusername >@< myhostname >
And I get back this response:
Enter passphrase for key < my keyfile >:
Permission denied (publickey).
Couldn't read packet: Connection reset by peer
I use the exact same key file to connect on Windows and it works without issue. I am never prompted to enter a passphrase because this particular keyfile does not have a passphrase and, unfortunately, I cannot replace it with a keyfile that does have a passphrase, because this was provided to me by my employer.
My keyfile's permissions are set to 600 and it is a ppk file.
What is going on here? What can I do to get connected?
ubuntu ssh terminal authentication sftp
add a comment |Â
up vote
0
down vote
favorite
I recently made the switch from Windows to Ubuntu for development and I have problems trying to setup a connection to a remote server.
On Windows, I use cyberduck to connect to a remote server through SFTP with an unprotected keyfile.
So now I am trying to sftp in with the command line doing this:
sudo sftp -o IdentityFile=< location of my keyfile > < myusername >@< myhostname >
And I get back this response:
Enter passphrase for key < my keyfile >:
Permission denied (publickey).
Couldn't read packet: Connection reset by peer
I use the exact same key file to connect on Windows and it works without issue. I am never prompted to enter a passphrase because this particular keyfile does not have a passphrase and, unfortunately, I cannot replace it with a keyfile that does have a passphrase, because this was provided to me by my employer.
My keyfile's permissions are set to 600 and it is a ppk file.
What is going on here? What can I do to get connected?
ubuntu ssh terminal authentication sftp
2
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
2
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
I believesshand friends (e.g.sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it asroot(viasudo), the referred file should be owned byroot. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you usesudoat all?)
â egmont
Oct 10 '17 at 20:37
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I recently made the switch from Windows to Ubuntu for development and I have problems trying to setup a connection to a remote server.
On Windows, I use cyberduck to connect to a remote server through SFTP with an unprotected keyfile.
So now I am trying to sftp in with the command line doing this:
sudo sftp -o IdentityFile=< location of my keyfile > < myusername >@< myhostname >
And I get back this response:
Enter passphrase for key < my keyfile >:
Permission denied (publickey).
Couldn't read packet: Connection reset by peer
I use the exact same key file to connect on Windows and it works without issue. I am never prompted to enter a passphrase because this particular keyfile does not have a passphrase and, unfortunately, I cannot replace it with a keyfile that does have a passphrase, because this was provided to me by my employer.
My keyfile's permissions are set to 600 and it is a ppk file.
What is going on here? What can I do to get connected?
ubuntu ssh terminal authentication sftp
I recently made the switch from Windows to Ubuntu for development and I have problems trying to setup a connection to a remote server.
On Windows, I use cyberduck to connect to a remote server through SFTP with an unprotected keyfile.
So now I am trying to sftp in with the command line doing this:
sudo sftp -o IdentityFile=< location of my keyfile > < myusername >@< myhostname >
And I get back this response:
Enter passphrase for key < my keyfile >:
Permission denied (publickey).
Couldn't read packet: Connection reset by peer
I use the exact same key file to connect on Windows and it works without issue. I am never prompted to enter a passphrase because this particular keyfile does not have a passphrase and, unfortunately, I cannot replace it with a keyfile that does have a passphrase, because this was provided to me by my employer.
My keyfile's permissions are set to 600 and it is a ppk file.
What is going on here? What can I do to get connected?
ubuntu ssh terminal authentication sftp
ubuntu ssh terminal authentication sftp
edited Oct 10 '17 at 18:24
Jeff Schaller
32.3k849109
32.3k849109
asked Oct 10 '17 at 16:50
Robbie Milejczak
1286
1286
2
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
2
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
I believesshand friends (e.g.sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it asroot(viasudo), the referred file should be owned byroot. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you usesudoat all?)
â egmont
Oct 10 '17 at 20:37
add a comment |Â
2
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
2
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
I believesshand friends (e.g.sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it asroot(viasudo), the referred file should be owned byroot. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you usesudoat all?)
â egmont
Oct 10 '17 at 20:37
2
2
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
2
2
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
I believe
ssh and friends (e.g. sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it as root (via sudo), the referred file should be owned by root. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you use sudo at all?)â egmont
Oct 10 '17 at 20:37
I believe
ssh and friends (e.g. sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it as root (via sudo), the referred file should be owned by root. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you use sudo at all?)â egmont
Oct 10 '17 at 20:37
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397267%2fattempting-to-connect-to-remote-server-with-sftp-but-receiving-a-needless-passph%23new-answer', 'question_page');
);
Post as a guest
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
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
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
2
IIRC, key format for putty/winscp/pscp is different from ssh/sftp client key format. Once you get your key(s) working, skip the SFTP and just use sshfs :)
â ivanivan
Oct 10 '17 at 16:55
2
See for example How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux) or How to convert .ppk key to OpenSSH key under Linux?
â steeldriver
Oct 10 '17 at 17:09
What does your key file look like? Show us its format.
â Martin Prikryl
Oct 10 '17 at 19:29
I believe
sshand friends (e.g.sftp) check the permission (600 as you mentioned, that's okay) and the owner of the key file as well. Since you're running it asroot(viasudo), the referred file should be owned byroot. It might even check the ownership of its containing directory, I'm not sure about it. (By the way, why do you usesudoat all?)â egmont
Oct 10 '17 at 20:37