您的位置:首页 > 运维架构 > Linux

Windows10连接linux服务器

2015-08-17 18:20 495 查看
平时我们通过windows连接服务器时,大多数用的是ssh客户端软件,推荐使用ssh,安全系数比较高。下面介绍用telnet连接服务器。

客户端:
C:\Users\dell>systeminfo主机名:           BOHAO
OS 名称:          Microsoft Windows 10 家庭中文版
OS 版本:          10.0.10240 
OS 制造商:        Microsoft Corporation
OS 配置:          独立工作站OS 构件类型:      Multiprocessor Free
注册的所有人:     dell

...

...

首先是通过windows连接linux服务器,所以安装telnet客户端服务,windows上安装起来很方便:
windows键+X -——>程序和功能 ——->启用或者关闭Windows功能———>选择Telnet客户端   
然后自动安装了Telnet客户端服务:Windows键盘+R --->cmd---->telnet
欢迎使用 Microsoft Telnet Client
Escape 字符为 'CTRL+]'
Microsoft Telnet>
此时客户端已经安装好了。

服务器端:

[root@localhost ~]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
检查是否安装xinetd:
[root@localhost ~]# rpm -qa | grep xinetd
xinetd-2.3.14-10.el5
已经安装了。
检查是否安装Telnet:
[root@localhost ~]# rpm -qa | grep telnet
telnet-0.17-39.el5
此时系统只默认安装了Telnet客户端,我们需要手动安装Telnet服务器端

通过yum来安装比较简单,因为之前已经下载了Telnet service包:

[root@localhost 共享文件]# rpm -ivh telnet-server-0.17-35.2.1.i386.rpm 

warning: telnet-server-0.17-35.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2

Preparing...                ########################################### [100%]

   1:telnet-server          ########################################### [100%]
安装完成。

配置:

 修改telnet配置文件:

vi /etc/xinetd.d/telnet

把disable的值改成no
修改iptables:
在/etc/sysconfig/iptables在该文件中添加一行:-A INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT

重启xinetd服务:

[root@localhost ~]# service xinetd restart

停止 xinetd:                                              [确定]

启动 xinetd:                                              [确定]

启动Telnet服务:
[root@localhost ~]# chkconfig telnet on

获得服务器IP:

[oracle@localhost tmp]$ /sbin/ifconfig | grep 192

          inet addr:192.168.1.108  Bcast:192.168.1.255  Mask:255.255.255.0

客户端通过Telnet连接服务器:

Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)

Kernel 2.6.18-194.el5 on an i686

login: oracle

Password:

Last login: Mon Aug 17 17:32:10 from localhost

-bash: /home/oracle/.bash_profile: line 24: syntax error: unexpected end of file-bash-3.2$ bash

[oracle@localhost ~]$ w

 18:10:58 up  3:31,  5 users,  load average: 0.10, 0.08, 0.08

USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

oracle   :0       -                14:42   ?xdm?   1:10   0.08s /usr/bin/gnome-

oracle   pts/1    :0.0             17:23    3:11   0.02s  0.02s bash

oracle   pts/2    :0.0             16:37   53:33   0.07s 10.96s gnome-terminal

oracle   pts/3    :0.0             17:56   14:15   0.00s  0.00s bash

oracle   pts/4    localhost        18:10    0.00s  0.00s  0.00s w

以上已成功连接。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: