Paramiko, Python, Windows : How to connect to a remote computer and from there to a NAS using SSH
I've seen several questions and answers related to this topic but I've been unable to grasp the howto. What I'm able to do : connect to a remote computer using a Python script using Paramiko and return information, for instance, to ping a switch : ssh = pk.SSHClient() ssh.set_missing_host_key_policy(pk.AutoAddPolicy()) ssh.connect('{}'.format(IP), port=xxx, username='xxx',password='xxx') stdin, stdout, stderr = \ ssh.exec_command('ping -n 1 xxx.xxx.x.x\n') print('Ping switch: \n', stdout.readlines()) What I would like to do but don't know how to : connect once to the computer and then using SS
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.