當咱們經過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.el5linux
檢查是否安裝Telnet:
[root@localhost ~]# rpm -qa | grep telnet
telnet-0.17-39.el5windows
配置:安全
修改telnet配置文件:bash
vi /etc/xinetd.d/telnet服務器
把disable的值改爲nooracle
修改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: [肯定]ssh
[root@localhost ~]# chkconfig telnet ontcp
[oracle@localhost tmp]$ /sbin/ifconfig | grep 192
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0spa
客戶端經過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
到此已成功鏈接.rest