Page 1 of 1

Unable to connect via FTP

Posted: Fri Jun 18, 2021 4:37 pm
by histotic1

I just installed LinuxMint OS and am trying CodeLite as my new IDE. So far it looks promising, but I ran into an issue trying to FTP my file to a remote host.

Through an SFTP plugin in CodeLite I added an account and am able to connect to the remote host. However, when I actually try to FTP the file, using this new account I get the following error:

Code: Select all

[quote]Error initializing SFTP session: Remote channel is closed.[/quote]

What am I missing?


Re: Unable to connect via FTP

Posted: Fri Jun 18, 2021 6:09 pm
by eranif

You are mentioning FTP but than talk about SFTP these are 2 different things.
CodeLite only support SFTP (i.e. it is able to connect over SSH to a remote SSHD daemon)

Make sure everything is setup properly.

The best way to try:

  • Can you ssh to the remote machine from a terminal?

Re: Unable to connect via FTP

Posted: Fri Jun 18, 2021 6:30 pm
by histotic1

Hmm, good point, thanks. Is it possible to request an FTP support as well?


Re: Unable to connect via FTP

Posted: Sun Jun 20, 2021 7:51 pm
by histotic1

I've now tried setting up SHTP connection but it doesn't seem to work.

  • I enabled SSH Access.
    Generated both Public and Private keys.
    Downloaded Private key and moved it to ~/.ssh dir on my computer.

I'm getting error "Interactive Keyboard is not enabled for this server" the same one as described in 2018 here:
https://sourceforge.net/p/codelite/mail ... /35021459/

I also installed Filezilla and am able to connect without any problems.

What am I missing? It is possible I am not able to connect via SSH. It'd be great to have an FTP plugin as a backup. :)


Re: Unable to connect via FTP

Posted: Tue Jun 22, 2021 12:09 am
by eranif

On the machine that you run CodeLite, do this:

  • Open a terminal and run this:

Code: Select all

ssh-keygen -t rsa -C "Key for CodeLite"

Keep clicking ENTER until it prompts that the generation completed successfully.

  • copy the content of the newly generated file ~/.ssh/id_rsa.pub to the clipboard

On the remote machine:

  • Open the file ~/.ssh/authorized_keys if the file does not exists, create it

  • Paste the content of the public key (the one you generated above) as the last line in this file (~/.ssh/authorized_keys )

  • Set the file mode to 0600: chmod 0600 ~/.ssh/authorized_keys

  • Try ssh now now from your local machine to the remote machine, if you followed my instructions, you should be able to connect without providing password and so will CodeLite

This is all documented here:
https://docs.codelite.org/plugins/sftp/ ... e-machines


Re: Unable to connect via FTP

Posted: Sat Jun 26, 2021 6:00 pm
by histotic1

Thank you for your suggestion. I have not tried this key approach yet but I was able to make some changes to my server SSH setup and was able to connect to it using SFTP plugin. However, when I try to connect via SFTP tab by selecting the same profile I'm getting the following error:

Error allocating SFTP session: sftp_new: Out of memory

That seems to be a new error and I can't seem to b able to find anything about it.


Re: Unable to connect via FTP

Posted: Thu Jul 01, 2021 2:40 am
by eranif

what is the output you get when you ssh from a terminal?
does your machine (the server side) prints output?
I found this issue: https://www.chiark.greenend.org.uk/~sgt ... -outofmem2 -> I am not sure its related that it looks interesting


Re: Unable to connect via FTP

Posted: Sat Jul 10, 2021 7:24 pm
by histotic1

I don't get any output. The interesting thing is that when I go into the SFTP plugin and add connection it works flawlessly. The error occurs when I try to connect from Workspace View/SFTP tab.


Re: Unable to connect via FTP

Posted: Wed Jul 14, 2021 9:49 pm
by eranif

This is strange, since its the same code flow..
Can you increase CodeLite log level and report the output here? (settings -> preferences -> misc -> log)