PHPSECLIB ssh2 \n not working

北城余情 提交于 2020-01-06 06:39:10

问题


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");

However it just outputs

Type Your ID    username
Type your Password 

Its as if the \n never worked.


回答1:


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

Using \r Resolved the issue.



来源:https://stackoverflow.com/questions/45790738/phpseclib-ssh2-n-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!