码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu开启22端口

时间:2016-12-03 09:55:11      阅读:2272      评论:0      收藏:0      [点我收藏+]

标签:open   gre   net   pen   state   tail   details   input   tcp   

【http://blog.csdn.net/baple/article/details/39288817】

安装OpenSSH 
Ubuntu缺省没有安装SSH Server,使用以下命令安装: 

sudo apt-get install openssh-server openssh-client 

不过Ubuntu缺省已经安装了ssh client。 

配置完成后重起: 
sudo /etc/init.d/ssh restart

-----

这一步好像还是没好。

iptables -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -m state --state ESTABLISHED -j ACCEPT

sudo netstat -antulp | grep ssh //如果有返回信息说22是listen那就OK了,可以愉快完winscp了。。。

Ubuntu开启22端口

标签:open   gre   net   pen   state   tail   details   input   tcp   

原文地址:http://www.cnblogs.com/beihaidao/p/6128005.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!