Skip to main content
SUSE

SUSE Lesson 14 Putty and SSH

By October 2, 2013September 12th, 2022No Comments



If you need to remotely access your Linux host it is not uncommon to use PuTTY on a Windows platform to initiate your Secure Shell or SSH connection. PuTTY, which is free to use would normally connect to the server and we can authenticate with a username and password.

Perhaps to enhance security or perhaps just to streamline the logins to SSH servers, user authentication can be managed via Public Keys. The server will hold a copy of the user’s Public Key, the user would have the private key which would normally be secured with a password to protect the use of the Private Key to the user who own’s it.

The password for the Private Key can be stored at the start of a Windows session in the PuTTY Agent, pageant.exe, so authentication happens just the once to the Private key and then for the length of that Windows logon session the agent passes the credentials through to the Private Key each time it is used to authenciate to a server.

The keys are generated with puttygen.exe. The public key is copied to the targets users home directory and then .ssh/authorized_keys file on the server. So if you would like to log in as bob to the server. The public key for bob is added to /home/bob/.ssh/authorized_keys file on the SSH server. The client machine needs just the Private Key.