Unable to connect via FTP

CodeLite installation/troubleshooting forum
histotic1
CodeLite Curious
Posts: 5
Joined: Fri Jun 18, 2021 4:33 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Unable to connect via FTP

Post 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?

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Unable to connect via FTP

Post 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?
Make sure you have read the HOW TO POST thread
histotic1
CodeLite Curious
Posts: 5
Joined: Fri Jun 18, 2021 4:33 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Re: Unable to connect via FTP

Post by histotic1 »

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

histotic1
CodeLite Curious
Posts: 5
Joined: Fri Jun 18, 2021 4:33 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Re: Unable to connect via FTP

Post 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. :)

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Unable to connect via FTP

Post 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

Make sure you have read the HOW TO POST thread
histotic1
CodeLite Curious
Posts: 5
Joined: Fri Jun 18, 2021 4:33 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Re: Unable to connect via FTP

Post 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.

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Unable to connect via FTP

Post 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

Make sure you have read the HOW TO POST thread
histotic1
CodeLite Curious
Posts: 5
Joined: Fri Jun 18, 2021 4:33 pm
Genuine User: Yes
IDE Question: PHP
Contact:

Re: Unable to connect via FTP

Post 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.

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Unable to connect via FTP

Post 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)

Make sure you have read the HOW TO POST thread
Post Reply