Press ESC to close

H12-891-v2-633-SSH服务器已配置完成且正确,SSH客户端运行以下哪些Pyth n代码可以成功建立SSH连接(私钥文件为id_rsa,与客户站Pyth n脚本处于同路径下)?

SSH服务器已配置完成且正确,SSH客户端运行以下哪些Pyth n代码可以成功建立SSH连接(私钥文件为id_rsa,与客户站Pyth n脚本处于同路径下)?
Aimp rt paramikKey=paramik .RSAKey.fr m_private_key_file(‘id_rsa’)Client = paramik . Transp rt((‘192.168.1.1’,22))Client.c nnect(username=’nuawei’,pkey-key))
Bimp rt paramikClient-paramik .client.SSHClient()Client.c nnect (h stname=’ 192. 168. 1. 1’ ,username=’huawei' , key filename=’id_rsa’)
Cimp rt paramikClient-paramik .client. SSHclient()Client.c nnect (h stname=’192. 168. 1. 1',username=’huawei' , pkey=’id_rsa
Dimp rt paramikClient = paramik .Transp rt((‘192.168.1.1',22))Client.c nnect(username=’ huaweil’ , key_filename='id_rsa')

参考答案:AB

发表回复