白天是个程序员,晚上就是个有抱负的演员,这是就是我,我住在天朝的陪都。

Regenerating SSH host keys

SSH1 protocol

For the SSH1 protocol you only require an RSA1 key:
ssh-keygen -f /etc/ssh/ssh_host_key -N '' -t rsa1

SSH2 protocol
For the SSH2 protocol you need two keys, for rsa and dsa:
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

if [ ! -d ~/.ssh ];then

mkdir -p~/.ssh

fi
chmod 700 ~/.ssh

ssh_host_key ssh_host_dsa_key ssh_host_rsa_key 的权限必须是600, 否则无法启动openssh-server

添加新评论

咻~