ssh2无法连接目标机器

使用node ssh2 提示错误:sudo: sorry, you must have a tty to run sudo

解决办法:
vi /etc/sudoers
注释掉Defaults requiretty这行

#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
#         You have to run "ssh -t hostname sudo <cmd>".
#
Defaults    requiretty

猜你喜欢

转载自blog.csdn.net/a19891024/article/details/77341676