#更新软件源
apt-get update安装ssh
apt-get install ssh备份ssh的配置文件
cp /etc/ssh/sshd_config{,.bak}修改配置文件如下
root@localhost:~# more /etc/ssh/sshd_config| grep -v "^#" |grep -v "^$" Include /etc/ssh/sshd_config.d/*.conf Port 22 PermitRootLogin prohibit-password PasswordAuthentication yes PermitEmptyPasswords no ChallengeResponseAuthentication no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server注释 grep -v “^#” |grep -v “^$” 去空格和#开头 启动ssh
service sshd start service ssh status添加开机启动
update-rc.d ssh enable移除启动
update-rc.d ssh remove查看添加的启动程序
ll /etc/rc2.d
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)