sshpass 无法正常工作 [英] sshpass not working properly

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

问题描述

我在 ubuntu 11.04 上使用 sshpass 非交互式地传递密码.

I'm using sshpass to pass the password non-interactive on ubuntu 11.04.

当我使用 sshpass 和 scp

when I use sshpass with scp

sshpass -p '123' scp sayuj@192.168.1.51:/home/sayuj/examples.desktop ~/Desktop/

效果很好

但它不适用于 ssh

sshpass -p '123' ssh sayuj@192.168.1.51

可能是什么问题,我该如何解决?

What could be the problem and how do I fix it?

推荐答案

我找到了解决方案:

问题是新版ssh客户端还有旧版sshpass(2008年没改).

The problem is that the new version of ssh client still has and old version of sshpass (from 2008 not changed).

您可以在此处

sshpass 源码

您所需要的只是修补源代码(只需添加 1 行代码和 1 个小改动)、编译和安装(之前不要忘记删除软件包).

All that you need is just patch the sources (just 1 line add and 1 little change), compile, and install (don't forget to remove package before).

这篇关于sshpass 无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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