Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
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.

share|improve this question
1  
See: serverfault.com/questions/182322/… –  Zoredache Jan 5 '13 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. –  James O'Gorman Jan 6 '13 at 11:27

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '13 at 22:31
    
After ssh-keygen -f /opt/id_rsa.pub -p i'm getting this: Enter old passphrase: Bad passphrase. –  Somebody Jan 5 '13 at 22:33
    
Then you need to enter the correct passphrase, or use some utility which generates correct keys (like ssh-keygen). –  Michael Hampton Jan 5 '13 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 '13 at 22:40
    
@Somebody how did you convert the keys from putty's format to ssh's format? –  DerfK Jan 6 '13 at 0:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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