SFTP impossible to connect to IONOS

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

SFTP impossible to connect to IONOS

Post by Kwai chang caine »

Hello at all

I don't understand why, but impossible to connect to my IONOS server with the team example code :|
Then that works perfectly with FileZilla and WinSCP :shock:

Code: Select all

If OpenFTP(0, "sftp://212.227.XXX.XX", "XX", "XXXXXX", 0, 22)

  Result = SendFTPFile(0, OpenFileRequester("Choose a file to send", "", "*.*", 0), "purebasic_sent.file", 1)
  
  Repeat
    Debug FTPProgress(0)
    Delay(300)
  Until FTPProgress(0) = #PB_FTP_Finished Or FTPProgress(0) =  #PB_FTP_Error

  Debug "finished"
  
Else
  MessageRequester("Error", "Can't connect to the FTP server")
EndIf
If someone know why ?

Have a good day
ImageThe happiness is a road...
Not a destination
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: SFTP impossible to connect to IONOS

Post by idle »

Did you try port 990 ?
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: SFTP impossible to connect to IONOS

Post by infratec »

You have to look in your configuartion at ionos:

https://www.ionos.de/hilfe/index.php?id=2940

There you can find the used port.

In general:

Linux hosting: Protocol SFTP 22
Windows hosting: Port FTP over TLS (FTPS) 990

What kind of host is it?

An tell us if the connection fail, or the file transfer.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: SFTP impossible to connect to IONOS

Post by Kwai chang caine »

Hello at you two,

Thanks a lot for your help
I'm very happy to can talk to you another time, since this long time 8)

I have try the port 990 and it's not better :|
I have a LINUX server, the name of the contract is "IONOS Serveur Virtuel Cloud S"

With Fillezilla and WinSCP, i enter exactely the same IP for the HOSTNAME, Login = "root" and the same password and that works perfectly :shock:
Infratec wrote:An tell us if the connection fail, or the file transfer.
I have the MsgBox "Can't connect to the FTP server" with this code

Why even the most simple things... is always difficult for KCC ? :cry:
ImageThe happiness is a road...
Not a destination
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: SFTP impossible to connect to IONOS

Post by Kwai chang caine »

I have found something, for be sure, i have cut the firewall of W10 :idea:
And here..miracle that works !!! :shock:
Then i have enable the Firewall like it is when i have created this thread, and that always works :shock: :shock:
I don't understand anything, that works now, but i don't know why :oops:
ImageThe happiness is a road...
Not a destination
PBJim
Enthusiast
Enthusiast
Posts: 294
Joined: Fri Jan 19, 2024 11:56 pm

Re: SFTP impossible to connect to IONOS

Post by PBJim »

Kwai chang caine wrote: Sun Nov 03, 2024 5:42 pm I have found something, for be sure, i have cut the firewall of W10 :idea:
And here..miracle that works !!! :shock:
Then i have enable the Firewall like it is when i have created this thread, and that always works :shock: :shock:
It's often the case, disable the firewall and all is well. :D

The reason for this is that when an FTP session is made, the server makes another connection back to your client, so there are two sessions. One is the command session and the other is for data. In cases where this isn't possible, FTP has passive mode, which is a workaround, using a single session. The command is PASV. I just checked up, to make sure I'm not telling you a load of rubbish and the below confirms :

https://stackoverflow.com/questions/169 ... assive-ftp

I can't remember the reason for the incoming connection still working after you re-enabled the firewall. It may be due to your router remembering the last session.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: SFTP impossible to connect to IONOS

Post by Kwai chang caine »

Thanks for your explanation 8)
Decidedly....the network is really difficult to understand :| again more with all this security all the days more and more present ...
ImageThe happiness is a road...
Not a destination
PBJim
Enthusiast
Enthusiast
Posts: 294
Joined: Fri Jan 19, 2024 11:56 pm

Re: SFTP impossible to connect to IONOS

Post by PBJim »

Kwai chang caine wrote: Sun Nov 03, 2024 8:10 pm Thanks for your explanation 8)
Decidedly....the network is really difficult to understand :| again more with all this security all the days more and more present ...
Yeah, I know it can be a pain at times. I really don't like SELinux because the thing is so complicated and we only have limited time, so most of the time we just disable it. :D

Maybe PB has passive mode in its FTP, but I'm not sure because I haven't kept up-to-date with it.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: SFTP impossible to connect to IONOS

Post by Kwai chang caine »

Yes this option apparently exist 8)
Passive (optional) Enables or disables passive mode for the connection (valid values are #True or #False). If this parameter is not specified, passive mode will be used.
https://www.purebasic.com/documentation ... enftp.html
ImageThe happiness is a road...
Not a destination
PBJim
Enthusiast
Enthusiast
Posts: 294
Joined: Fri Jan 19, 2024 11:56 pm

Re: SFTP impossible to connect to IONOS

Post by PBJim »

Kwai chang caine wrote: Sun Nov 03, 2024 8:35 pm Yes this option apparently exist 8)
Passive (optional) Enables or disables passive mode for the connection (valid values are #True or #False). If this parameter is not specified, passive mode will be used.
https://www.purebasic.com/documentation ... enftp.html
Yes, I see that passive is the default anyway. Perhaps IONOS doesn't support it.
Post Reply