0
root@myhost:/# ssh -i /opt/id_rsa.pub azureuser@myhost2.cloudapp.net
Enter passphrase for key '/opt/id_rsa.pub':
azureuser@myhost2.cloudapp.net's password:

I have created key pair without passphrase, is it possible to get rid of passphrase prompt while connecting to remote server?

I would like to use key connection while using this command:

tar -c /opt/lampp/htdocs/somehost | ssh -i /opt/id_rsa.pub azureuser@myhost2.cloudapp.net 'tar -xvf - -C /opt/somefolder' > /dev/null 2>&1 &

So that files transfer continue even if terminal have lost connection.

2
  • 1
    See: serverfault.com/questions/182322/…
    – Zoredache
    Jan 5, 2013 at 23:14
  • Based on your output the passphrase is being ignored and is falling back to password authentication. It looks like there is a problem with your converted key if you believe it to have no passphrase. Jan 6, 2013 at 11:27

1 Answer 1

2

You can remove (or change) the passphrase using the -p option to ssh-keygen. For example:

ssh-keygen -f /opt/id_rsa -p

Press Enter at the new passphrase prompt to remove the passphrase.

6
  • I haven't passphrase in the first place. Like i said, i have used windows putty keygen and generated keys without passphrase.
    – Somebody
    Jan 5, 2013 at 22:31
  • After ssh-keygen -f /opt/id_rsa.pub -p i'm getting this: Enter old passphrase: Bad passphrase.
    – Somebody
    Jan 5, 2013 at 22:33
  • Then you need to enter the correct passphrase, or use some utility which generates correct keys (like ssh-keygen). Jan 5, 2013 at 22:35
  • The fact is, that i use these keys to connect via putty and it doesn't ask me for passphrase...
    – Somebody
    Jan 5, 2013 at 22:40
  • @Somebody how did you convert the keys from putty's format to ssh's format?
    – DerfK
    Jan 6, 2013 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.