情况一、操作系统已经安装了telnet
$telnet ip port
情况二、linux操作系统没安装telnet,并且没有root权限(奇葩的情况)
[weblogic@rhel6 ~]$ rpm -ivh telnet-0.17-47.el6.x86_64.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (权限不够)
解决方案:
[weblogic@rhel6 test]$ ls
telnet-0.17-47.el6.x86_64.rpm telnet-server-0.17-47.el6.x86_64.rpm
[weblogic@rhel6 test]$ rpm2cpio telnet-0.17-47.el6.x86_64.rpm | cpio -div
./usr/bin/telnet
./usr/share/man/man1/telnet.1.gz
220 块
[weblogic@rhel6 test]$ ./usr/bin/telnet 192.168.56.110 8081
Trying 192.168.56.110...
Connected to 192.168.56.110.
Escape character is '^]'.
情况三、windows的操作系统,没有安装telnet客户端
使用xshell直接敲telnet命令即可
Xshell for Xmanager Enterprise 4 (Build 0232)
Copyright (c) 2002-2014 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
Xshell:\> telnet 192.168.56.102 9001
Connecting to 192.168.56.102:9001...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
安装
例如rhel6.3(root)下安装telnet:
#rpm -ivh telnet-0.17-47.el6.x86_64.rpm
或者#yum install telnet*
例如win7/8下安装telnet:
小结:linux下的telnet是单文件,解压直接运行(设为可执行文件)即可;xshell自带telnet命令;