【问题标题】:Doing telnet to unix server from command line and save output从命令行执行 telnet 到 unix 服务器并保存输出
【发布时间】:2014-12-07 07:06:45
【问题描述】:

我正在尝试在命令行中使用以下命令

plink.exe -ssh lhostname -l 用户名 -pw 密码 -m "c:\test.txt" > output.txt

但它只返回以下内容而不是全部内容

正在尝试 xxx.xxx.xxx.xxx...

连接到主机名 (xxx.xxx.xxx.xxx)。

转义字符是'^]'。

实际结果如下:

正在尝试 xxx.xxx.xxx.xxx...

连接到主机名 (xxx.xxx.xxx.xxx)。

转义字符是'^]'。

连接被外部主机关闭。 (或 telnet:连接到地址 xxx.xxx.xxx.xxx:连接被拒绝

                                telnet: Unable to connect to remote host: Connection refused )

有什么方法可以将完整的输出写入文件?

【问题讨论】:

    标签: unix command-prompt


    【解决方案1】:

    这是一条错误消息:

         telnet: Unable to connect to remote host: Connection refused 
    

    错误信息被command-name 2> errors.txt重定向

    【讨论】:

      猜你喜欢
      • 2013-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-10
      • 2018-06-17
      • 2011-12-11
      相关资源
      最近更新 更多