0
我试图用ssh登录来运行命令。用ssh执行命令
的ls
命令工作正常,
[email protected]:~$ ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /root/.juju/ssh/juju_id_rsa [email protected] ls
给文件列表/目录
但是,当我使用ssh运行/bin/bash
它挂(不响应输出)。
[email protected]:~$ ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /root/.juju/ssh/juju_id_rsa [email protected] /bin/bash
当我在192.168.50.2上运行/bin/bash
时,没有输出,但命令返回。如果ssh命令没有从ssh返回,原因是什么?
你正在启动一个交互式shell,它不会挂起,它正在等待你给它一些输入。 – arco444 2014-10-07 10:55:03
非常感谢arco。我现在明白了。 – 2014-10-07 10:57:55