ssh登录问题出现Pseudo-terminal will not be allocated because stdin is not a terminal错误
来源:互联网 发布:高铁争夺战 知乎 编辑:程序博客网 时间:2024/05/17 07:55
原文地址::http://www.jianshu.com/p/e66014b67506
问题:
今天遇到一个ssh登录问题,当远程登录主机时出现Pseudo-terminal will not be allocated because stdin is not a terminal. 错误。
原因:用脚本调用或者程序调用ssh登陆远程的时候出现的这个情况。背后的机制和深层次的原因没有深究。
解决方案:
写登陆脚本ssh的时候加个参数
ssh -t -t user@10.242.1.1
或者
ssh user@10.242.1.1 -tt
记录下ssh远程执行脚本
cmd="echo 'hello'>/home/user/XL_WORK/test.bak"
ssh -t -t user@10.242.1.1 $cmd
另:
ssh在6.7版本以后,对一些加密算法不支持,需要手动添加
应该是jsch默认使用diffie-hellman-group-exchange-sha1算法,请在主机ssh服务的sshd_config文件中添加下列加密算法并重启ssh服务验证。 KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256
阅读全文
0 0
- ssh登录问题出现Pseudo-terminal will not be allocated because stdin is not a terminal错误
- 脚本调用ssh后出现Pseudo-terminal will not be allocated because stdin is not a terminal
- 脚本调用ssh后出现Pseudo-terminal will not be allocated because stdin is not a terminal
- Pseudo-terminal will not be allocated because stdin is not a terminal
- Centos7.1 安装测试Alluxio 出现Pseudo-terminal will not be allocated because stdin is not a terminal 错误的解决
- ssh@host:""ssh切换到其他机器上执行多条命令;Pseudo-terminal will not be allocated because stdin is not a terminal.
- 使用kermit串口工具时出现 /dev/ttyS0 is not a terminal device 错误
- Mac终端出现“terminal pointer being freed was not allocated…”解决办法
- Vim: warning: Input is not from a terminal
- will not be managed by Spring 和was not registered for synchronization because synchronization is n
- WARNING: terminal is not fully functional
- 解决Sheet can not be presented because the view is not in a window这样的问题
- Auto property synthesis will not synthesize property …because it is ‘readwrite’ but it will be synth
- Python is not installed as a framework. The Mac OS X backend will not be a
- Ubuntu 中出现username is not in the sudoers file. This incident will be reported的错误
- ubuntu 启动错误stdin:is not tty
- Terminal错误: unable to find utility "PackageApplication", not a developer tool or in PATH
- msysgit 1.17.10 WARNING: terminal is not fully functional
- MySQL字符编码乱码问题
- 【STL】序列式容器--vector
- DWR 控制请求session过期处理
- ext-dwr-mybatis分页实现
- 使用postgreSQL DataSync 进行pg数据库升级 数据同步 升级脚本生成, postgreSQL DataSync简单教程
- ssh登录问题出现Pseudo-terminal will not be allocated because stdin is not a terminal错误
- Spring 常用工具类
- java HttpSession理解
- 数据结构实验——排序
- SpringBoot 缓存
- java 获取系统属性
- 文件重名,
- web项目错误页面处理
- JSP中java代码和js代码的执行问题