bash – 如何永久存储服务器密钥? openconnect

前端之家收集整理的这篇文章主要介绍了bash – 如何永久存储服务器密钥? openconnect前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有没有办法在成功连接后存储服务器密钥,
ssh的方式呢?

无论我连接多少次,我都必须输入“是”
接受服务器密钥.我希望它会永远被接受和存储.

###############################
amir@amirpc:~$sudo openconnect uk.cisadd.com -u myusername
POST https://uk.cisadd.com/
Attempting to connect to server xxx.xxx.xxx.xxx:443
SSL negotiation with uk.cisadd.com
Server certificate verify Failed: signer not found

Certificate from VPN server "uk.cisadd.com" Failed verification.
Reason: signer not found
Enter 'yes' to accept,'no' to abort; anything else to view: 

Connected to HTTPS on XXX.XXX.XXX.XXX
###############################

可以编写bash脚本来运行openconnect并转义是吗?

最好的方法是第一次登录到服务器时将–servercert保存在这样的剪贴板中
echo "password" | sudo openconnect  -u username  uk2.cisadd.com --servercert sha25:xxxxxxx

猜你在找的Bash相关文章