If you often need to establish SSH connections to a server, entering the password each time may be a hassle or even a non-starter. For example, in our case, we use ssh connections in our nightly build scripts, so obviously entering a password would not be an option here… So it can be useful to configure the server and your client to accept secure ssh connection without the need to enter a password. What must be done, then, is to generate a public/private key pair, and copy the public part into the appropriate place on the server side. For doing this, on the user’s home directory, on the client machine, type:
1 |
local> ssh-keygen -t rsa -f ~/.ssh/id_rsa |
-t tells the type of encryption -f tells where to store the public/private key pairs. In this case, the .ssh directory in the home directory is being used A password will be asked; leave this part blank, just […]