SSH 服务器已配置完成且正确,SSH 客户端运行以下哪些 Pythom 代码可以成功建立 SSH 连接(私钥文件为 id_rsa,与客户端Python 脚本处于同路径下?[]
Aimport paramiko
client=paramiko.client.SSHClient ( )
client.connect(hostname=' 192.168.1.1', username='huawei', key_filename='id_rsa’)
Bimport paramiko
client = paramiko. Transport((' 192.168.1.1',22))
client. connect(username=' huawei', key_filename='id_rsa')
Cimport paramiko
client=paramiko.client.SSHClient()
client.connect(hostname='192.168.1.1', username=1 huawei', pkey='idrsa')
Dimport paramiko
key=paramiko.RSAKey.from_private_key_file('id_rsa')
client = paramiko.Transport((192.168.1.1',22)
client.connect(username= huawei', pkey-key
参考答案:B