0

I have a public/private key pair for ssh connections to a server S, but now, even if do a ssh to another device that does't need any key authentication, I always have the message:

> ssh user@192.168.0.10
Enter passphrase for key '/home/user/.ssh/id_dsa': 
user@192.168.0.10's password:

Usually I hit enter in the first question (leaving it blank) and I type the user's password in the second question.

But as I want to write some scripts to automatize some things, the "Enter passphrase for key '/home/user/.ssh/id_dsa': " message bothers me.

Why it appears for every connection request? Can I do something so it won't ask me that for every connection? Just with the server S?

Thanks

Lilás
  • 1,111
  • 1
  • 16
  • 29

2 Answers2

2

Assuming you're using Linux ssh-agent to store your keys so you don't have to keep typing it.

Using ssh-agent to manage your keys

Dannie
  • 2,430
  • 14
  • 16
1

Based on this ServerFault answer:

ssh -o PubkeyAuthentication=no host.example.org

To avoid typing it every single time, you can add something like this to ~/.ssh/config

Host host.example.org
PubkeyAuthentication no
Community
  • 1
  • 1
aland
  • 4,829
  • 2
  • 24
  • 42
  • It works, but as I am doing a script in Ruby to perform the scp, It still asks me. I put these lines in /etc/ssh/ssh_conf but it didn't work – Lilás Jan 15 '14 at 10:50
  • Are you calling `scp` itself, or are you using some library, like `Net::SCP`? If former, `scp -o PubkeyAuthentication=no bluh host.example.org:` works for me. If later, you might need to manually create ssh connection with desired options using `Net::SSH` and use it. – aland Jan 15 '14 at 11:21