Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i have add public form another computer.

on my computer i see the files in the ssh folder

user@user-170:~/.ssh$ ls
authorized_keys  config  id_rsa  id_rsa.pub  known_hosts  known_hosts.old

now i see the list of keys

user@user-170:~/.ssh$ ssh-add -l
2048 fc:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:13 user@user-php (RSA)

now i want to add authorized_keys which i have added from different computer, but it ask me to enter passphrase and what ever i enter it will just keep asking me about the pass phrase

user@user-170:~/.ssh$ ssh-add authorized_keys
Enter passphrase for authorized_keys: 
Bad passphrase, try again for authorized_keys: 
Bad passphrase, try again for authorized_keys: 
Bad passphrase, try again for authorized_keys: 
Bad passphrase, try again for authorized_keys: 

and it keeps on asking

what passphrase should i give to take it

Thanks in advance

share|improve this question

1 Answer 1

up vote 3 down vote accepted

ssh-add is a command for ssh agent, not to add keys.

See http://mah.everybody.org/docs/ssh

ssh-add adds RSA or DSA identities to the authentication agent,

See http://linux.die.net/man/1/ssh-add

You might want ssh-copy-id or simply cat

cat key >> ~/.ssh/authorized_keys

The password you would enter would be the user password (ssh-copy-id) or the password on the key (ssh-add)

share|improve this answer

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.