PHPSECLIB ssh2 \n 不工作 [英] PHPSECLIB ssh2 \n not working

查看:44
本文介绍了PHPSECLIB ssh2 \n 不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我要移到运行旧 IBM 操作系统和 GUI 的旧服务器中当我去登录时,我运行命令:

So i am removing into a old server running a old IBM OS and GUI when i go to log in I run command:

$ssh->write("username\n");
$ssh->write("Passw0rd");

但是它只是输出

Type Your ID    username
Type your Password 

就好像 \n 从来没有工作过一样.

Its as if the \n never worked.

推荐答案

该系统最抽象的方式是一台旧的 windows 机器.\n 适用于现代机器,但较旧的 Windows 使用 \r

The system is in the most abstract way is a old windows machine. \n works on modern machines but the older windows use \r

使用 \r 解决了问题.

Using \r Resolved the issue.

这篇关于PHPSECLIB ssh2 \n 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆