0

I have generated pair of both public and private key for one remote host. Now I want to add another private key in open format to connect via ssh to second remote host, but ssh denies connection with "Bad passphrase" when I want to add key with ssh-add "key_name". I only have private key, which in Putty on Windows machine works fine. I only have two files in my /home/user/.ssh directory:

id_dsa
known_hosts
muru
  • 207,228
Alan Kis
  • 267

1 Answers1

0

Easy as pie.

Simply go to the .ssh folder in your home and add the file config

nano /home/${USER}/.ssh/config

and add the following lines e.g.

Host duck-a-rub
HostName mail.man.com OR <IP-Address>
User rubberduck
Port 223
IdentityFile /full/path/to/keys/rubberduck_id_dsa

save the file and give it a try.

ssh duck-a-rub

HTH, s1mmel

s1mmel
  • 2,124