架ssh服务

来源:互联网 发布:中俄石油协议价格知乎 编辑:程序博客网 时间:2024/04/29 21:59

机房台式机,操作系统ubuntu,apt-get ssh install万事大吉,由于是动态ip,ifconfig获得ip地址。

 

个人的笔记本1,操作系统opensuse 11.1。这个主要参考一下两个网页介绍的设置:

 

http://hi.baidu.com/filash/blog/item/5bbbbfce4233b90a93457e7b.html

.由于opensuse默认打开了防火墙,所以开启这些服务后还不行,必须定义一下防火墙规则。通过yast--安全和用户--防火墙--自定义规则,添加新规则,设置你所允许的IP,协议是TCP,目标端口22,来源端口不填,就设置好了。

 

http://bbs.oncecode.com/redirect.php?fid=23&tid=30&goto=nextoldset

1、修改sshd_config文件,命令为:vi /etc/ssh/sshd_config
2、将#PasswordAuthentication no的注释去掉,并且将NO修改为YES
3、将#PermitRootLogin yes的注释去掉
4、重新启动SSH服务,命令为:/etc/init.d/sshd restart
5、验证SSH服务状态,命令为:/etc/init.d/sshd status

 

 

防火墙是个要点,第二篇介绍的编辑sshd_config是比较基本的。

 

个人笔记本2,操作系统mac os x。

打开system preference->sharing->remote login

不过最好也修改一下/etc/sshd_config不要让人用root上来。

原创粉丝点击