试题详情

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

Aimport paramik
Key=paramik.RSAKey.from_private_key_file(‘id_rsa‘)
Client=paramik.Transport((‘192.168.1.1‘,22))
Client.connect(username=‘huawei‘,pkey-key)

Bimport paramik
Client-paramik .client.SSHClient()
Client.connect (hostname=‘192. 168. 1. 1‘ ,username=‘huawei‘, key filename=‘id_rsa‘)

Cimport paramik
Client-paramik .client. SSHclient()
Client.connect (hostname=‘192. 168. 1. 1‘,username=‘huawei‘ , pkey=‘id_rsa‘)

Dimport paramik
Client = paramik .Transport((‘192.168.1.1‘,22))
Client.connect(username=‘huawei‘ , key_filename=‘id_rsa‘)