我开发了这个expect脚本,TELNET_TEST.expect来测试远程计算机上的TELNET连接。
这个脚本应该通过目标机器上的telnet连接,等待登录提示,发送密码,然后退出。
这个脚本确实有效,在示例1中,您可以看到脚本成功地通过telnet登录,然后退出,但是有非常混乱的事情发生了,(对我来说)。
为什么我会得到一个退出状态1?我想我应该退出0级.
请让我知道为什么我要退出状态1?另外,为了获得我预期的退出代码,我需要修改我的脚本吗?
我的预期脚本:
more TELNET_TEST.expect
#!/usr/bin/expect --
set LO
基于本指南,我试图使用linux的telnet发送一封测试邮件。
https://linuxconfig.org/send-an-email-using-telnet
但连接立即断开:
$ telnet smtp.gmail.com 465
Trying 108.177.126.108...
Connected to smtp.gmail.com.
Escape character is '^]'.
MAIL FROM: asdasd@asd.Connection closed by foreign host
如何保持连接打开足够长的时间来发送测试邮件?
在那之后,我重新安装了mysql,但仍然得到:Can't connect to Error: local MySQL server through socket'/tmp/mysql.sock'(2)。
尝试启动服务器:start mysql.server,但得到:
ERROR! The server quit without updating PID file (/usr/local/var/mysql/appledeMacBook-Pro-6.local.pid).
下一步我尝试的是:
mysqladmin -h 127.0.0.1 -u root -p shutd
我有一个运行在虚拟化Debian8.5(Windows10下的VirtualBox)下的测试游戏服务器;这台Linux机器在网络上有自己的IP地址。游戏服务器使用端口2106、7777和10241。我成功地配置了我的机器,使游戏服务器可以从WAN访问,这3个端口被重定向到Linux机器IP 192.168.1.70 (测试是从我的Windows机器192.168.1.1进行的)。
我在Windows上做了一些远程登录测试,比如:
telnet 192.168.1.70 2106 ==> Test OK
telnet 192.168.1.70 7777 ==> Test OK
tel
我正在将kerberos集成到我们的项目中,首先我已经部署了一个KDC服务器,然后我想测试它是否工作,所以我使用kerberos telnet进行了测试,但我收到了以下错误消息:
Escape character is '^]'.
>>>TELNET: I support auth type 2 6
>>>TELNET: I support auth type 2 2
>>>TELNET: I support auth type 2 0
>>>TELNET: I support auth type 1 2
我正在尝试设置我的EBS卷的自动快照,为此,我设置了Amazon Cli工具,但当我尝试使用它们时,收到以下错误:
HTTPSConnectionPool(host='ec2.us-west-2a.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
我做了telnet ec2.us-west-2a.amazonaws.com 443,