run multiple instances of sshd on ubuntu

sudo cp -r /etc/ssh /etc/ssh2
sudo cp /etc/init.d/ssh /etc/init.d/ssh2
sudo cp /etc/default/ssh /etc/default/ssh2
sudo ln /usr/sbin/sshd /usr/sbin/sshd2

sudo vi /etc/init.d/ssh2
SSHD_OPTS='-f /etc/ssh2/sshd_config'

sudo vi /etc/ssh2/sshd_config'

Port 28222
PidFile /var/run/sshd2.pid
HostKey /etc/ssh2/ssh_host_rsa_key
HostKey /etc/ssh2/ssh_host_dsa_key
HostKey /etc/ssh2/ssh_host_ecdsa_key

ssh-keygen -b 1024 -t rsa -f /etc/ssh2/ssh_host_key;
ssh-keygen -b 1024 -t rsa -f /etc/ssh2/ssh_host_rsa_key;
ssh-keygen -b 1024 -t dsa -f /etc/ssh2/ssh_host_dsa_key;

参考资料
http://ubuntuforums.org/showthread.php?t=1497376

原创文章,转载请注明: 转载自海波无痕

本文链接地址: run multiple instances of sshd on ubuntu

文章的脚注信息由WordPress的wp-posturl插件自动生成

此条目发表在server分类目录,贴了, , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论链接可以 移除 nofollow.