How do I set up passwordless login in PuTTY? - Gregg Hosting

The affects of Web Hosts on Your Business Website

Here're ways your choice of web hosting service provider impacts the performance of your business:


check

Website loading speed

check

Uptime and availability

check

Customer support

check

Security

check

Server location

How do I set up passwordless login in PuTTY?

How do I set up passwordless login in PuTTY?

Overview

This article discusses how to use PuTTY without a password. Before continuing with this post, make sure PuTTY is configured correctly.

On a Dedicated Server, these procedures can also be used to create and assign SSH keys to an admin/root user.

Creating a key pair

When configuring PuTTY, open the puttygen.exe file you downloaded. This is where you’ll make your private/public keypair.
Make that the RSA radio button at the bottom of the PuTTY Key Generator box is selected.
02 keygen putty.png
Select Generate from the drop-down menu.
To help generate the keys, move your mouse around the box.
A new pop-up box displays when the key is created:
pubkey number three.png
Store public key and Save private key are buttons on the bottom right that will save both to your computer.
Name the public key something like dreamhostpublickey when you save it. It is not essential to manually add the extension.
When you save the private key, give it a unique name such as dreamhostprivatekey and save it in a safe place on your computer. Again, there’s no need to manually add the extension because it’s not required.
When you save, you’ll be presented with a notification concerning a password.
putty passphrase
To save without a password, select Yes.
If you’re working with MySQL Workbench, you’ll need to create keys.

You must export the private key in OpenSSH format if you’re building a key pair for MySQL Workbench.

Openssh key conversion
Select Export OpenSSH key from the Conversions tab.
Without an extension, save this to your computer.
This key can now be imported into MySQL Workbench.

Uploading the public key to your server

Upload your newly created public key to your GreggHost user’s home directory. You can do this with an FTP client like Filezilla.
Using PuTTY, connect to your GreggHost web server.
Go to the /home directory of your user.
[server]
$ cd cd cd cd cd cd
Run the following command to create a /.ssh directory:
[server]
mkdir.ssh $
Change the directory’s permissions to 700.
[server]
.ssh $ chmod 700
While staying in your user’s home directory, use the following command to append the public key you just uploaded to a new file named authorized keys in the /.ssh directory:
[server]
ssh-keygen -i -f ssh-keygen -i -f ssh-keygen – publickeydreamhost.com >> ~/.ssh/authorized keys
This appends the authorized keys file with the dreamhostpublickey you uploaded from your home computer. Simply verify that the name of the public key file in the command corresponds to the name of the file you uploaded.

Run the following command to change permissions:
chmod 600 /.ssh/authorized keys [server]$
After that, delete the original dreamhostkey.pub file as follows:

[server]$ rm dreamhostpublickey The key has now been removed from the server (protected from access by others)

Log out of PuTTY and relaunch the program.
Open the setup box after the program has restarted and select the Connection > Data category on the left.
username 04 png
In the first field, Auto-login username, type your GreggHost SHELL username. 05 auth.png
Click Connection > SSH > Auth in the same setup box.
Navigate to the location on your computer where you saved your Gregghost privatekey file by clicking the Browse option.
06 sessions.png
Click the Session category in the configuration box and type the following:
Name of the server: yourserver.dreamhost.com (This is the name of your GreggHost server.)
22 (port)
SSH (Secure Shell)
Create a new name for your saved session.
Save your work by pressing the Save button.
Open PuTTY and choose the new passwordless login session you made, then click the Open button. You are logged in without being prompted for a password.