NOTE:此试验还没成功。。。。。。。。。。。。。。。。。
相关链接:http://www.cnblogs.com/itech/archive/2011/05/04/2036488.html
软件下载地址:
ls services -lart
sudo chmod 777 services
sudo chmod 777 services
打开 :sudo /etc/init.d/ssh start
关闭 :services iptables stop
sudo apt-get install openssh-client=1:5.3p1-3ubuntu3
sudo apt-get install openssh-server
为了省事起见,直接在终端输入如下指令即可:
ifconfig |
但是这种情况下是显示所有的信息,如果你只是想要查看到IP,并且不闲麻烦的话,也可以输入下面的命令:
ifconfig eth0 |awk '/inet/ {split($2,x,":");print x[2]}'
|
#/usr/sbin/sshd -d
debug1: sshd version OpenSSH_4.6p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
socket: Address family not supported by protocol
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.
4.2 启动服务
#/usr/sbin/sshd
4.3 查看监听端口中是否有22
#netstat -tnlp | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 21018/sshd
vi /etc/ssh/sshd_config
ListenAddress 0.0.0.0 #去掉前面的#
ListenAddress :: #保留前面的#
如果你的新连接不能上网,那么就切换到Auto eth0
特别要注意,是ifconfig而不是ipconfig,后者是Windows下的终端命令。
要查看Windows XP或Windows 2000目前的IP地址,可以通过ipconfig命令实现。首先需要进入命令提示符:单击开始—〉程序—〉附件—〉命令提示符,在窗口中输入ipconfig按回车键即可看到目前各个连接的IP地址

2693

被折叠的 条评论
为什么被折叠?



