![](https://seccdn.libravatar.org/avatar/558c2c3bc43d203656f9699c2be2bfa9.jpg?s=120&d=mm&r=g)
On 28 Aug 2001 13:37:32 -0400, Timothy R.Butler wrote:
I use ssh and scp a lot, so I would like to avoid typing in my password every time I want to copy a file, or type a command on my remote server. I know that I should copy my identity.pub, and put it in ~/.ssh over on the remote server, but what else do I need to do? It seems that isn't enough, as I still have to type my password to login.
You need to run ssh-agent on the local machine to make your private key available and ssh-add to add it to the agent. I have the following lines in my .bash_profile: eval `/usr/bin/ssh-agent` /usr/bin/ssh-add This will add two variables to your environment: SSH_AGENT_PID=xxx SSH_AUTH_SOCK=/tmp/ssh-XXXXXXXX/agent.xxx If you're running Gnome, ssh-askpass will pop up a box for you to enter your passphrase when you login. (Not sure about KDE; I think it will automatically do this even without those lines, as long as it finds a private SSH key under your home directory.) On the remote machine, make sure you copy your local identity.pub into ~/.ssh/authorized_keys, instead of ~/.ssh/identity.pub. I actually collect all of my public keys into one authorized_keys file and use scp to transfer it. Daniel