前言:
添加ssh密钥步骤:
chmod 700 .ssh #创建ssh
cd .ssh
chmod 700 authorized_keys #添加权限密钥
vim authorized_keys #编辑密钥 添加本地电脑ssh密钥
vim /etc/ssh/sshd_config #更改ssh配置文件
配置文件
# no default banner path
#Banner none# Allow client to pass locale environment variables
AcceptEnv LANG LC_*# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs serverUseDNS no
AddressFamily inet
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication yes