codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

can not open file/directory on host

Open Tetetetetetetet opened this issue 7 months ago • 5 comments

Hello, thanks for your great jobs! But I’ve come into some problem using the ssh service.

I’ve read the docs and connect to my host successfully, but really have no idea about how to open any file or directory from my host as everything is empty as the followed picture:

Image

I’ve tried to

  • search, but fail to search relevant and useful information as I haven’t seen others coming into this problem.
  • try stuff around, but just nothing works. btw, a “SFTP” appears at the top of left where now is the host address before tap the refresh button.

I really like the elegancy of this app and its support for working on ipad through ssh and am really confused about what’s wrong with my code app? Is there some settings that I haven’t turn on?

Tetetetetetetet avatar Apr 27 '25 22:04 Tetetetetetetet

Is the SSH server hosted by yourself? Please make sure SFTP is enabled and your account has the correct permission.

You might also provide me with your server SSH's version by running sshd -V in the terminal.

bummoblizard avatar Apr 30 '25 23:04 bummoblizard

No, the host is not hosted by myself. But I check the /etc/ssh/sshd_config and there is a

Subsystem       sftp    /usr/lib/openssh/sftp-server

in it, so I think the stfp may be open.

Other relevant infomation is as followed:

  • I use code app on my ipad, which can connect to the host through ish, so I think I do have the correct permission.
  • sshd -Vraise a unknown option -- V, but ssh -V is OpenSSH_8.9p1 Ubuntu-3ubuntu0.13, OpenSSL 3.0.2 15 Mar 2022
  • To reproduce the error, just install code app and input all needed infomation a ssh connection needs just as the docs, then it will be connected to the host successfully and comes into the situation.

Tetetetetetetet avatar May 02 '25 12:05 Tetetetetetetet

I have the exact same issue as @Tetetetetetetet when attempting to edit files on my self-hosted Ubuntu server

ssh version is OpenSSH_8.2p1 Ubuntu-4ubuntu0.13, OpenSSL 1.1.1f 31 Mar 2020

Termius is able to connect via SSH to my server with no issue, but it errors when connecting via SFTP: authentication is successful, but it gives the message Timeout waiting for response from SFTP subsystem.

I'm wondering if this is a server config issue. I will do some digging. Assuming a solution is found, I would like to see it added to the app's documentation to help others :)

jboby93 avatar Jun 19 '25 22:06 jboby93

update: I was able to get SFTP file access working, a bit. I think the next issue is app-related.

@Tetetetetetetet : in your file /etc/ssh/sshd_config, replace

Subsystem sftp /usr/lib/openssh/sftp-server

with

Subsystem sftp internal-sftp

This fixed the issue of not having any files listed.

My issue now is, I want to open files outside of my user's home folder: I have my website pages and other files I would want to edit on another drive, but there seem to be no way to go up in the directory tree or to enter a directory to open. Am I missing something here? With the Termius app, I am able to select the '..' folder to go up a level as expected, but see no such feature here.

Image

jboby93 avatar Jun 19 '25 23:06 jboby93

@jboby93 Thanks for sharing the fix with us! You might uncheck the 'Resolve Home Path' option in Code App's settings under the SSH remote section.

I am looking at ways to improve navigation across remote directories.

bummoblizard avatar Jun 20 '25 00:06 bummoblizard