Home Linux Generating SSH Keys on Windows PuTTY for Linux Server

Generating SSH Keys on Windows PuTTY for Linux Server

Download and Install PuTTY from below link

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

open PuTTYgen and click on Generate

Enter password in Key passphrase and confirm passphrase.

Now click on save private key and save it.

login to Linux server shell and authorize public key in that

mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0644 ~/.ssh/authorized_keys

Now add your public key in ~/.ssh/authorized_keys and save it

vi ~/.ssh/authorized_keys

Copy the key from generated window

How to Login with PuTTY

Open PuTTY and Under Host Name (or IP address) enter your server IP or hostname as user@hostname.com or user@ipaddress

Next goto SSH tab on left hand side and click on + sign. Now click on Auth. Here in Private Key File for Authentication browser to your saved private key

Go back to session tab from left hand side options and click open. As you will now be asked for passphrase for the key file. Enter the key and you will be logged in into the server.

As you have completed the above step and you can login with your key file. Its time for disabling password authentication so that only key will be used for SSH connection.

vi /etc/ssh/sshd_config

Find

PasswordAuthentication yes

Replace

PasswordAuthentication no

Save the file and restart sshd

systemctl restart sshd

If you now try to login into the server without key file you will see the below error

Must Read

Routing Domain Name in Haproxy

I hope you are following the below guide. Now suppose you want to route domain name to open specific backend that have...

Enable Logging in Haproxy

HAProxy can emit log message for processing by a syslog server. This is compatible with familiar syslog tools like Rsyslog, as well...

Getting real IP in Nginx when behind cloudflare Haproxy

Create a file named cloudflare_ips.ls and in that add all the cloudflare IP's vi /etc/haproxy/cloudflare_ips.ls 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/12 172.64.0.0/13 131.0.72.0/22 2400:cb00::/32 2606:4700::/32 2803:f800::/32 2405:b500::/32 2405:8100::/32 2a06:98c0::/29 2c0f:f248::/32

Getting Real IP in HaproxyNginx configuration

Well its a little configuration can get real to nginx when haproxy is set as reverse proxy. Follow this...

Haproxy as Single Point to Failure Node With Glusterfs and MariaDB Maxscale Cluster

HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It...