您的位置:首页 > 其它

FreeBSD开启SSH远程登录

2017-11-14 14:00 204 查看
1、安装时选择上SSH,或者源码安装SSH

2、使用root登陆系统

3、使用ee编辑器编辑/etc/inetd.conf,去掉ssh前的#,按ctrl+c,再输入exit保存退出

4、编辑/etc/rc.conf,添加一行sshd_enable="YES"

5、编辑/etc/ssh/sshd_config,将

#PermitRootLogin no改为PermitRootLogin yes //允许root登陆

#PasswordAuthentication no改为PasswordAuthenticationyes//使用系统PAM认证

#PermitEmptyPasswords no改为PermitEmptyPasswords no//不允许空密码

修改端口号:/etc/ssh/sshd_config

    #port=22改为 Port=number(你想修改的数字)

保存退出

6、启动SSHD服务,/etc/rc.d/sshd start

7、查看服务是否启动,netstat -an,如果看到22端口有监听,恭喜!!!

来源:http://blog.sina.com.cn/s/blog_8e3a84c60101hybl.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  freebsd ssh