shell - 自动输入shell密码的方法?

标签 shell ssh

所以我有一个 ssh 到另一台计算机的脚本。由于我经常使用它,我想知道是否可以让脚本自动输入 ssh 提示的密码,或者以任何其他方式绕过每次运行脚本时复制粘贴密码?

最佳答案

使用空密码短语设置 ssh key 比将密码放入脚本中更好。

https://wiki.archlinux.org/index.php/SSH_Keys

关于shell - 自动输入shell密码的方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8200461/

相关文章:

windows - 批处理脚本简介

git - 如何对 git ls-files 中的所有文件运行命令?

C# SSH.NET - 一个 SSH 连接与多个 SSH 连接

windows - 在 Windows 上使用 putty 的 Git

erlang - 停止 Erlang SSH channel 的问题

linux - ssh 隧道命令输出到文件

java - 与 Android 的 SSH

shell - 通过SSH运行shell时如何自动输入?

android - linux shell - 无法将字符串与 : adb shell getprop ro. product.brand 进行比较

shell - 如何从终端中的路径中删除目录?