arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create PuttyGen keys for accessing a VPS and disable password authentication
#1
Step 1:  Navigate to the link below and download PuttyGen for either 32 or 64 bit VPS
https://www.chiark.greenend.org.uk/~sgta...atest.html

Step 2:  Create a Keys Folder in a safe area of your computer and move the puttygen.exe file into the Keys Folder


Step 3:  Open the puttygen.exe file as indicated below and generate a Private.ppk key

[Image: jS9lCJx.gif]

[Image: N3qiTRE.gif]

Step4:  Save the private.ppk file to the Keys Folder as indicated below.

[Image: UtOhuNc.gif]
Step 5:  Copy the contents of the Public Key below to the clipboard/notepad

[Image: KOX8aGz.gif]

Step 6: Access your VPS with SSH to add the PuttyGen Key with the following commands
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
paste the contents of the public key that you copied before to notepad to the 'authorized' keys file
ctrl x to exit and accept and ctrl y

Check that you have made the change to the authorized keys successfully and it now contains your private key. Then exit the VPS.

Step 8: Open up your Putty Again and load your VPS as with the diagram below.

[Image: nE7Op8i.gif]

Step 9: Click on the SSH link in the left column below and then select 'auth'.  Use the "browse" tool to
select the private.ppk file in your Keys Folder.

[Image: NpcB0Rt.gif]

Step 10: Open the VPS

Step 11:  Once you've checked that the keys are working you can now disallow password authentication:


nano /etc/ssh/sshd_config

Search with ctrl + w  passwordauthentication yes
Change it to 'no'
Then exit with ctrl+x and y

Check that the change has been made successfully with nano

Now check whether you can access root with a password.  You should not be able to do so.
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  


Messages In This Thread
How to create PuttyGen keys for accessing a VPS and disable password authentication - by deanhills - 07-01-2018, 02:25 AM
A few improvements - by Mashiro - 07-01-2018, 09:02 AM
Putty Gen Keys - by deanhills - 07-02-2018, 02:09 AM
Reply - by Mashiro - 07-02-2018, 06:08 AM


person_pin_circle Users browsing this thread: 3 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting