- 用ssh-keygen命令或者PUTTY先在客户端机器上生成公钥,私钥对。也可以在任何机器上生成 公钥,私钥对,但在其它包括服务器上生成的话,需要把私钥复制到客服端,这不是一个好的做法。
- 把公钥(id_rsa.pub)内容复制到服务器的$HOME/.ssh/authorized_keys目录,如果目录不存在则创建一个。
- 检查和设置目录文件权限。
chmod 700 $HOME/.ssh
chmod go-w $HOME $HOME/.ssh
chmod 600 $HOME/.ssh/authorized_keys
chown `whoami` $HOME/.ssh/authorized_keys - 设置PUTTY或者其它SSH客户端使用对应的用户名和私钥登录。如果用SHELL客户端则需要把确保私钥保存在$HOME/.ssh/id_rsa,权限设置为400。
30 responses to “SSH实现无密码登录”
hello world
hello world
lisinopril 5 mg tablet
lisinopril 5 mg tablet
ursodiol 300 mg
ursodiol 300 mg
online azithromycin
online azithromycin
ciprofloxacino dexametasona
ciprofloxacino dexametasona
doxycycline for sinus infection
doxycycline for sinus infection
generic antibiotics online cheap
generic antibiotics online cheap
zyloprim allopurinol 300 mg
zyloprim allopurinol 300 mg
vibramycin ointment
vibramycin ointment
metoprolol brand
metoprolol brand
stendra 200 mg precio
stendra 200 mg precio
doxycycline monohydrate 100 mg capsule
doxycycline monohydrate 100 mg capsule
doxycycline
doxycycline
cialis drug classification
cialis drug classification
cenforce d uses
cenforce d uses
cenforce 200 mg price
cenforce 200 mg price
cenforce 150mg review
cenforce 150mg review
reddit orlistat reviews
reddit orlistat reviews
levitra v viagra
levitra v viagra
stendra online pakistan
stendra online pakistan
udenafil buy
udenafil buy
domperidone in us
domperidone in us
flomax finasteride combination
flomax finasteride combination
what is fincar used for
what is fincar used for
semaglutid biverkningar ögon
semaglutid biverkningar ögon
semaglutid kaufen amazon
semaglutid kaufen amazon
semaglutid tablet
semaglutid tablet
doxycycline 100mg for cough
doxycycline 100mg for cough
cialis suggested dosage
cialis suggested dosage
liraglutide injection pen instructions
liraglutide injection pen instructions