host = "<IP Address>"
port = 22
username = "<some random username>"
password = "<password>"
command = "ls"
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(host, port, username, password)
stdin, stdout, stderr = ssh. exec_command(command)
lines = stdout.readlines()
print(lines)
That was my code to just try and connect to another system using SSH in Python (Jupyter Notebook). But I always get this error message "TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".
My intention is to connect to another machine and extract some files from the machine (trying to create a data pipeline). But I'm unsure as to how to get past this error.