Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
如果不使用按键或终端的重型脚本编写,您想要实现的目标是不可能的。
你为什么不想使用钥匙?这是解决您问题的最简单、最安全的解决方案。
另请看一下:如何让 ssh 从 stdin 接收密码
许多脚本语言具有可让您与 ssh 交互的模块。如果您熟悉 Perl,您可以查看 CPAN 上的 Net::SSH 系列模块:http://metacpan.org/pod/Net::SSH2
What you want to achieve is not possible without using keys, or heavy duty scripting of the terminal.
Why don't you want to use keys? It's the easiest most secure solution to your problem.
Also take a look at:How to make ssh receive the password from stdin
Many scripting languages have modules that let you interact with ssh. If you're familiar with Perl you could take a look at the Net::SSH family of modules at CPAN:http://metacpan.org/pod/Net::SSH2
您必须使用公钥/私钥身份验证。在 ubuntu 上,其工作方式如下所述: https://help.ubuntu.com/community/SSH /OpenSSH/Keys
注意:其他 -nix 风格应该以类似的方式工作。
you have to use public/private key authentication. on ubuntu this works like described here: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
note: other -nix flavors should work in a similar.
你能检查一下这是否有效吗?
<username>:<password>@<host>
Can you check if this works -
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(3)
如果不使用按键或终端的重型脚本编写,您想要实现的目标是不可能的。
你为什么不想使用钥匙?这是解决您问题的最简单、最安全的解决方案。
另请看一下:
如何让 ssh 从 stdin 接收密码
许多脚本语言具有可让您与 ssh 交互的模块。如果您熟悉 Perl,您可以查看 CPAN 上的 Net::SSH 系列模块:
http://metacpan.org/pod/Net::SSH2
What you want to achieve is not possible without using keys, or heavy duty scripting of the terminal.
Why don't you want to use keys? It's the easiest most secure solution to your problem.
Also take a look at:
How to make ssh receive the password from stdin
Many scripting languages have modules that let you interact with ssh. If you're familiar with Perl you could take a look at the Net::SSH family of modules at CPAN:
http://metacpan.org/pod/Net::SSH2
您必须使用公钥/私钥身份验证。在 ubuntu 上,其工作方式如下所述: https://help.ubuntu.com/community/SSH /OpenSSH/Keys
注意:其他 -nix 风格应该以类似的方式工作。
you have to use public/private key authentication. on ubuntu this works like described here: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
note: other -nix flavors should work in a similar.
你能检查一下这是否有效吗?
Can you check if this works -