Trying to SSH from windows server to a Linux remote connection using SSH and paramiko and just 'pwd' this server with the following code (I've changed the user/password and server IP from real code):
import paramiko
from paramiko import SSHClient, AutoAddPolicy
LOCAL_IP=IP
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(LOCAL_IP,username=username, password=password)
client.exec_command('pwd')
I'm getting the following result:
(<paramiko.ChannelFile from <paramiko.Channel 0 (open) window=24576 -> <paramiko.Transport at 0x6716710L (cipher aes128-ctr, 128 bits) (active; 1 open channel(s))>>>,
<paramiko.ChannelFile from <paramiko.Channel 0 (open) window=24576 -> <paramiko.Transport at 0x6716710L (cipher aes128-ctr, 128 bits) (active; 1 open channel(s))>>>,
<paramiko.ChannelFile from <paramiko.Channel 0 (open) window=24576 -> <paramiko.Transport at 0x6716710L (cipher aes128-ctr, 128 bits) (active; 1 open channel(s))>>>)
The SSH connection IS open, I can tell by netstat at the linux server that I'm trying to SSH to....