I have written the code below:
import os, sys
import paramiko
ssh = paramiko.SSHClient()
ssh.connect(server_name, username = ?, password = ?)
I'm trying to connect to an ftp server that doesn't need an account (username and password) to get access. However, when I try some of the following:
ssh.connect(server_name, username = '', password = '')
or
ssh.connect(server_name, username = 'anonymous', password = '')
or
ssh.connect(server_name)
I get this error:
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
Could someone please explain why I get this error and how to fix it?