有没有办法以编程方式获取 SSH 服务器密钥指纹而不对其进行身份验证?
我正在尝试ssh -v user@host false 2>&1 | grep "Server host key"
,但如果未设置基于密钥的身份验证,则会挂起等待密码。
有时 crontab -e
我会在 Ubuntu 机器上失败。对于所有用户,包括 root 和 rootcrontab -eu <user>
下的用户都是一样的。经常这样,到处都是成功:
$ crontab -e
/tmp/crontab.SHw8Ge: Input/output error
Creation of temporary crontab file failed - aborting
$ crontab -e
/tmp/crontab.L8gEG4: Input/output error
Creation of temporary crontab file failed - aborting
$ crontab -e
crontab: installing new crontab
$ crontab -e
/tmp/crontab.Vvp59T: Input/output error
Creation of temporary crontab file failed - aborting
$ crontab -e
crontab: installing new crontab
Run Code Online (Sandbox Code Playgroud)
我似乎在重复手动或脚本创建文件时没有遇到问题:
$ vim /tmp/crontab.Vvp59T
$ ls -la /tmp/crontab.Vvp59T
-rw-r--r-- 1 <user> …
Run Code Online (Sandbox Code Playgroud)