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

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...