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

Linux远程登录

时间:2014-09-14 12:49:27      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   ar   文件   art   div   sp   

SHH 配置文件

/etc/shhd_config  服务端配置文件

/etc/ssh_config  客户端配置文件

[root@localhost ssh]# chkconfig --list sshd
sshd               0:关闭    1:关闭    2:启用    3:启用    4:启用    5:启用    6:关闭
[root@localhost ssh]# 

【实验一:修改ssh端口】

1.查找修改的端口是否已经被占用

[root@localhost ssh]# netstat -ln |grep :22
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN      
tcp        0      0 :::22                       :::*                        LISTEN      
[root@localhost ssh]# netstat -ln |grep :80

2.修改配置文件,PORT 改为其他

[root@localhost ssh]# vim /etc/ssh/sshd_config 

3.查看修改后的效果

[root@localhost ssh]# netstat -ln |grep :27101
[root@localhost ssh]# service sshd restart
停止 sshd:                                                [确定]
启动 sshd:                                                [确定]
[root@localhost ssh]# netstat -ln |grep :27101
tcp        0      0 0.0.0.0:27101               0.0.0.0:*                   LISTEN      
tcp        0      0 :::27101                    :::*                        LISTEN    

4.linux远程登录

[root@localhost /]# ssh -p27101 192.168.1.2

5.linux远程拷贝 scp

 

Linux远程登录

标签:style   blog   color   os   ar   文件   art   div   sp   

原文地址:http://www.cnblogs.com/yimiao/p/3970867.html

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