ssh without password

just a note
I want to write a scrpit to achieve the "ssh no password" function in nutanix cluster
first look at the "ssh no password" part
script.. maybe one day will write..just maybe

for windows client to linux server ssh without password is easy
simply speaking
create private key and public key from windows
save the windows public key in linux server
and load private key file while you ssh to linux server

this is setting step


lab environment
linux server: 10.31.1.70
windows client: 10.31.1.68

need tool:
PuTTY
PuTTYgen
we can download from
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html



windows
1. start puttygen-> generate

























2. copy public key code to txt

























3. save private key file

























linux
1. verify ssh config /etc/ssh/sshd_config
sudo vi /etc/ssh/sshd_config
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
check file path and PubkeyAuthentication should be yes























2. create file vi ~/.ssh/authorized_keys
post windows public key code and save

































3. change file permission
chmod 700 ~/.ssh/authorized_keys























4. change folder permission
chmod 600 ~/.ssh

















5. restart ssh servier
sudo service sshd restart























windows connection
1. open putty
->connection->SSH->Auth load windows private key file
























2. session -> connect to linux server
if success,keyin user name and access linux server without keyin password















































Reference article:
別讓 MIS 不開心,免密碼直接登入遠端的 SSH Server
http://blog.itist.tw/2015/03/login-ssh-server-without-username-and-password.html

留言

這個網誌中的熱門文章

Easy way for Try out o365 E3 - Step2 - Install Azure AD connect sync AD account to o365

AHV - migrate all VM on one node to other node

Win7 RSAT & 2003R2 ADWS