-1

I've been stack for a few days now. I'm wondering if anyone can help me with any suggestions on how to connect to the sFTP server below. The python code I've tried is as follows:

import pysftp

with pysftp.Connection(host ='https://api1.datasource.eex-group.com ', username = 'blablabla', password ='blablabla') as sftp:
    
    print ('Connected!')

When that didn't work, I tried this:

import requests

r = requests.get('https://api1.datasource.eex-group.com', auth=(' username', 'password')) 

Thanks in advance!

  • I don't think that you should be using an https address to connect to an stfp server. Try and remove the `https://` Can you show the issue? – Daniel Lee Jul 02 '20 at 07:05
  • Hi Daniel, thanks for the reply! I'm getting the following error when i remove https://:SSHException: No hostkey for host api1.datasource.eex-group.com found. – Lloyd Kizito Jul 02 '20 at 07:17

1 Answers1

0

You can try this:

import pysftp
cnopts = pysftp.CnOpts()
cnopts.hostkeys = None   
with pysftp.Connection(host ='https://api1.datasource.eex-group.com ', username = 'blablabla', password ='blablabla', cnopts=cnopts) as sftp:

print ('Connected!')

Else here are a few solutions to this problem: "No hostkey for host ***** found" when connecting to SFTP server with pysftp using private key Verify host key with pysftp "No hostkey for ... found" in pysftp code even though cnopts.hostkeys is set to None

Daniel Lee
  • 7,189
  • 2
  • 26
  • 44
  • I think we are up to something here Daniel, just that this time I got a different error with the code you provided. It's as follows: gaierror: [Errno 11001] getaddrinfo failed and ConnectionException: ('https://api1.datasource.eex-group.com ', 22). I googled the first error and added import socket socket.getaddrinfo('127.0.0.1', 8080) but it did me no good. Any more suggestions? – Lloyd Kizito Jul 02 '20 at 07:43