有没有办法在成功连接后存储服务器密钥,ssh的方式是什么?
无论我连接多少次,我都必须输入" yes "来接受服务器密钥.我希望它能被永久地接受和存储.
###############################
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
###############################
Run Code Online (Sandbox Code Playgroud)
可以编写bash脚本来运行openconnect并转义是吗?
我打赌你可以选择--no-cert-check或拥有有效的SSL证书:
sudo openconnect --no-cert-check uk.cisadd.com -u myusername
Run Code Online (Sandbox Code Playgroud)
小智 5
最好的方法是第一次登录到服务器时将--servercert保存在这样的剪贴板中
echo "password" | sudo openconnect -u username uk2.cisadd.com --servercert sha25:xxxxxxx
Run Code Online (Sandbox Code Playgroud)