ftp - Connect to Implicit SSL/TLS (port 990) using Paramiko? -


is there way use paramiko, connect sharefile.com sftp?

for example using approach, can connect sftp (the 1 created myself in linux):

from paramiko import sshconfig, sshclient, autoaddpolicy, authenticationexception  def connect(self):     rec in self:          closing(sshclient()) ssh:             ssh.set_missing_host_key_policy(autoaddpolicy())             try:                 login = rec.login_id                 ssh.connect(login.host, port=login.port, username=login.user, password=login.passwd)             except socket.gaierror:                raise validationerror(_("name or service '%s' not known") % (login.host))             except authenticationexception:                raise warning(_("bad username or password"))                                 closing(ssh.open_sftp()) sftp:                 #do 

but if try connect using login info fileshare.com, not work. in fileshare.com says can connect 2 ways:

security: standard (port 21) or implicit ssl/tls (port 990)
ftp server: company.sharefileftp.com
user name: username or username_id
password: (your sharefile password)

so if try connect using port 990, either connection timed out (after time) or error:

file "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 306, in connect     t.start_client() file "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 465, in start_client     raise e sshexception: error reading ssh protocol banner 

the way able connect it, using ubuntu built in gui connect ftp, using:

ftp//:user@company.sharefileftp.com 

if used sftp, not connect (i guess uses default port 22)

i tried connect terminal:

ftp user@company.sharefileftp.com name or service not known 
sftp -oport=990 user@company.sharefileftp.com ssh_exchange_identification: connection closed remote host couldn't read packet: connection reset peer 

the secure ftp (ftp on tls/ssl) not sftp.

the sftp runs on ssh.

you cannot use paramiko connect ftp, neither plain ftp nor on tls/ssl.

use ftp_tls class ftplib ftp on tls/ssl in python.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -