I am trying to connect from one server to another server using paramiko. Here is the code:
import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname, username='abc', password='password') stdin, stdout, stderr = ssh.exec_command('ssh xyz@host1 ls')
I am unable to run the above code because of the special character "@". Could someone suggest me how to resolve it.
I am able to run
ssh xyz@host1 ls command in putty successfully. But through python code it is not working.