SSH Private-Public Key between Windows & Linux Machine

1. Generate the Key 

======================================================
Windows:
1. Start PuTTYgen on Windows Press Generate and Move over the Randomizer Field
======================================================
Linux:
1. Open the OpenSSH key with the command:
> ssh-keygen -b 4096
======================================================

2. Save public and private key to the disk

3. open authorized_keys on the remote machine
> sudo nano ~/.ssh/authorized_keys

past the public key:
=====================================================
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAg3jaKHicRktxHfik/9HQGgTOVk6ZfqnfizeP0n7Qyd3w//dxjEbS3vdby04FOCSyMnjcvcDd3Y/kC5ioGOuljbYzzl9kypYdvX1MGLk/k3n7PVORhatFr1T02SzcXSXBl6CFAk0KqlaC0BLLBRSLNhTU/Q01uuvDtm14fkHwQn+MZ+vTV+AeTv7daBRi6loHge0BemggwWV9BGcJihz6Fm55mEAWiGXGi4JpRlhFkZIaqwmUx5TyMLft5D0xp04K5aDHN2tkhcfNffV9bWs31yYV4L2sdb2lHTtHU5tomcfdN3PGEANzQDEiTjGSCgz/OQ11EW6eHlDUwdoZQsNpKQ== rsa-key-20190609
======================================================

Windows
In putty you have to go to Configuration and change the following settings:

Connection > Data
enter the Auto-login username

Connection > SSH > Auth
Private key file for authentication:

here you select the path to the private key file

Schreibe einen Kommentar