Fedora 16
Sponsored Link

Keys Authentication2011/11/09

 
Configure SSH server to login with Keys Authentication. It is needed for it to make private key for client and public key for server.
[1] Download 'puttygen.exe' from Putty's site.
[2] Start 'puttygen.exe' and click 'Generate' button.
 
[3] Move mouse untill progress bar will be full.
 
[4] Set passphrase in 'Key passphrase' and 'Confirm passphrase'. Next, Click 'Save public key' and 'Save private key' and Save keys with a file name you want.
 
[5] Open 'public_key' you saved.
 
  Remove the first line and last line and replace the second line to 'ssh-rsa' and then remove all indention like follows. 'ssh-rsa
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
 
[6] Login with a user and put 'public_key'.
[fedora@dlp ~]$
mkdir .ssh

[fedora@dlp ~]$
chmod 700 .ssh

[fedora@dlp ~]$
cd .ssh

[fedora@dlp .ssh]$
vi authorized_keys
# Copy and Paste 'public_key'.

ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
[fedora@dlp .ssh]$
chmod 600 authorized_keys

[fedora@dlp .ssh]$
su -

Password:
[root@dlp ~]#
vi /etc/ssh/sshd_config
# line 65: Change

PasswordAuthentication
no
[root@dlp ~]#
systemctl restart sshd.service

[7] Start Putty and select 'private_key' like follows.
 
[8] If it's all OK, connect to the server with keys authentication.
 
[9] Passphrase you set is required to input fpr login. After inputiing correct one, it's possible to login like below.
 
Matched Content