linux ssh远程登录

安装ssh

#服务端

$ yum install -y openssh-server

配置文件位置:/etc/ssh/sshd_config

#客户端

$ yum -y install openssh-clients

#登陆

$ ssh [email protected] -p 22

#问题:

root@compute01:~# ssh -i tangzhennan.pem [email protected]
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 @        WARNING: UNPROTECTED PRIVATE KEY FILE!          @
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 Permissions 0644 for 'tangzhennan.pem' are too open.
 It is required that your private key files are NOT accessible by others.
 This private key will be ignored.
 bad permissions: ignore key: tangzhennan.pem
 [email protected]'s password:

扫描二维码关注公众号,回复: 224512 查看本文章

解决方法:将权限由0644降低为0600
$ chmod  0600  tanzhennan.pem

猜你喜欢

转载自tzhennan.iteye.com/blog/2410656