codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

Feature Request: SSH Improvements

Open RobertCordingly opened this issue 4 years ago • 29 comments

This app would be AMAZING if it had better SSH/Remote connections support. If you could mimic VS Code's remote connections plugin this would be great.

Beyond that minor SSH improvements would be awesome, for example pressing tab to auto complete and adding arrow keys on the keyboard to go up/down.

RobertCordingly avatar Apr 04 '21 04:04 RobertCordingly

This or SFTP would work really great! Sftp especially would be nice :)

eiiot avatar Apr 17 '21 23:04 eiiot

Agreeeee!. Remote-SSH like VS Code would be a killer feature for codeapp.

AaronHeee avatar Jun 10 '21 03:06 AaronHeee

Throwing my hat into the ring for this feature. With Remote-SSH development I could work completely from the iPad when travelling.

mcx808 avatar Jun 28 '21 17:06 mcx808

Thank you for all your feedback! I will make this a priority and see if I can include it in July's update.

bummoblizard avatar Jun 29 '21 10:06 bummoblizard

Hello,

If it’s not too late, can you add a me too. My wish is to be able to run code remotely to run docker-compose and provision a stack of servers in Docker. Or run remotely Ansible!

I want to tell you that your application has given me hope. I see that it is now possible to use my iPad Pro as a developer tool. You have to continue your excellent work.

Thank you.

sylvoie avatar Jan 22 '22 15:01 sylvoie

SFTP is available in the TestFlight builds now. I am now working on terminal support.

bummoblizard avatar May 03 '22 02:05 bummoblizard

SFTP is available in the TestFlight builds now. I am now working on terminal support.

Any chance I can get an invite to testflight?

mcx808 avatar May 03 '22 11:05 mcx808

SFTP is available in the TestFlight builds now. I am now working on terminal support.

Any chance I can get an invite to testflight?

It's in README.md :)

bummoblizard avatar May 03 '22 13:05 bummoblizard

So it is, thanks! I can confirm remote access via SFTP is working for me. Looking forward to remote terminal access.

FYI, I've also started using another interesting iPad app: Blink Shell. It supports local vscode environment & remote vscode development via ssh, although this method doesn't yet support remote terminal either.

mcx808 avatar May 03 '22 14:05 mcx808

So it is, thanks! I can confirm remote access via SFTP is working for me. Looking forward to remote terminal access.

FYI, I've also started using another interesting iPad app: Blink Shell.

It supports local vscode environment & remote vscode development via ssh, although this method doesn't yet support remote terminal either.

Wow it's amazing! It's a clever approach I must say. Does it also work offline?

bummoblizard avatar May 03 '22 14:05 bummoblizard

So it is, thanks! I can confirm remote access via SFTP is working for me. Looking forward to remote terminal access. FYI, I've also started using another interesting iPad app: Blink Shell. It supports local vscode environment & remote vscode development via ssh, although this method doesn't yet support remote terminal either.

Wow it's amazing! It's a clever approach I must say. Does it also work offline?

Kind of, you can still start a code instance locally (on the iPad) without a network connection, but then you can only edit files that are within that instance. It has a files.app provider so remote hosts can be browsed within iOS files, but it doesn't seem to work with local files. It works best for remote development either on a server or github repos.

mcx808 avatar May 03 '22 14:05 mcx808

Just to be clear on the terminology, you have SFTP setup under the Remote Connections menu, and you’re working on terminal connections next. Does that refer to SSH connections?

Prometheia avatar Jun 02 '22 21:06 Prometheia

Just to be clear on the terminology, you have SFTP setup under the Remote Connections menu, and you’re working on terminal connections next. Does that refer to SSH connections?

Yes. Because SFTP and SSH are basically the same protocol.

bummoblizard avatar Jun 03 '22 01:06 bummoblizard

Just to be clear on the terminology, you have SFTP setup under the Remote Connections menu, and you’re working on terminal connections next. Does that refer to SSH connections?

Yes. Because SFTP and SSH are basically the same protocol.

Right, but is that the reason that straight SSH connections don’t currently work? Because you’re still working on it (and not because there’s a bug or user error)? If I understand correctly, SFTP uses SSH for authentication, but SSH itself needs to be implemented differently. Currently, in the Remote Connections menu, if I plug in my remote server’s IP address, port 22, username, and password, I get a ‘unknown error’ message. I know for sure that SSH on the remote server is setup correctly because I can access it from other apps.

Prometheia avatar Jun 03 '22 03:06 Prometheia

Right, but is that the reason that straight SSH connections don’t currently work? Because you’re still working on it (and not because there’s a bug or user error)? If I understand correctly, SFTP uses SSH for authentication, but SSH itself needs to be implemented differently. Currently, in the Remote Connections menu, if I plug in my remote server’s IP address, port 22, username, and password, I get a ‘unknown error’ message. I know for sure that SSH on the remote server is setup correctly because I can access it from other apps.

I'm still working on it.

bummoblizard avatar Jun 03 '22 03:06 bummoblizard

Right, but is that the reason that straight SSH connections don’t currently work? Because you’re still working on it (and not because there’s a bug or user error)? If I understand correctly, SFTP uses SSH for authentication, but SSH itself needs to be implemented differently. Currently, in the Remote Connections menu, if I plug in my remote server’s IP address, port 22, username, and password, I get a ‘unknown error’ message. I know for sure that SSH on the remote server is setup correctly because I can access it from other apps.

I'm still working on it.

Great! Really looking forward to having this feature! I use Juno Connect for data science on my iPad connected to my remote server. Your app will pair nicely if I can connect to that same server in a VSCode environment. Keep up the great work!

Prometheia avatar Jun 03 '22 03:06 Prometheia

Guys I've managed to make it work. Hopefully I can put this on TestFlight within this weekend.

Simulator Screen Shot - iPad (9th generation) - 2022-06-04 at 15 40 13

bummoblizard avatar Jun 04 '22 07:06 bummoblizard

I have the latest TestFlight build and am still having trouble connecting.

I tried two methods.

Local network:

  • Address: IP address of PC I want to connect to
  • Port: 22
  • Username: username of PC
  • Password: username of PC

This method either results in a crash to the home screen or the ‘unknown error’ in the app.

Alternative method: Ngrok I also have ngrok running on the PC I want to connect to. This forwards traffic from ngrok to port 22 on the PC I want to connect to.

  • Address: 1.tcp.ngrok.io
  • Port: my reserved ngrok tcp address port
  • Username: username of PC
  • Password: password of PC

This method also either results in a crash to the home screen or the ‘unknown error’ in the app.

Prometheia avatar Jun 05 '22 15:06 Prometheia

I also tried connecting to a Linux server I have running and that connected successfully. I’m going to check to see if I have any firewall settings on the Windows PC that would be blocking the connection.

Do you know of anything on your side that would prevent connections on Windows PCs but not Linux?

Prometheia avatar Jun 05 '22 16:06 Prometheia

I also tried connecting to a Linux server I have running and that connected successfully. I’m going to check to see if I have any firewall settings on the Windows PC that would be blocking the connection.

Do you know of anything on your side that would prevent connections on Windows PCs but not Linux?

I have one in mind. But I'll test it on a Windows device and let you know. Thank you for the report!

bummoblizard avatar Jun 05 '22 16:06 bummoblizard

I also seem to be missing the ‘Run’ button that’s normally in the upper right: IMG_1771

Prometheia avatar Jun 05 '22 16:06 Prometheia

I also seem to be missing the ‘Run’ button that’s normally in the upper right: IMG_1771

It's currently an expected behaviour. You can still run your code in the terminal by running the python command.

bummoblizard avatar Jun 05 '22 16:06 bummoblizard

I also tried connecting to a Linux server I have running and that connected successfully. I’m going to check to see if I have any firewall settings on the Windows PC that would be blocking the connection.

Do you know of anything on your side that would prevent connections on Windows PCs but not Linux?

Hi. Please see if build 91 on TestFlight resolves this.

bummoblizard avatar Jun 08 '22 02:06 bummoblizard

Hi. Please see if build 91 on TestFlight resolves this.

Downloaded and tested build 91.

A couple things:

  • App crashes the first time I add any new remote connection. Subsequent attempts appear to be successful.
  • It seems like it can connect to my Win10 PC because the terminal displays my username/PC name. However, the connection isn’t saved to the list of remotes, and I can’t access any files for editing. ‘Unknown error’ still pops up.
  • The terminal also opens with ‘clear’ already typed out (see image).

IMG_1807

Prometheia avatar Jun 08 '22 02:06 Prometheia

Actually, I don’t think it’s connecting to the Win10 computer after all. There’s no indicator in the bottom-left that says I’m connected to a remote server. And Code never actually says ‘Connected to xxx.xxx.xxx.xxx’ ‘Fingerprint: ‘.

The screenshot of the terminal above seems like it’s trying to connect, but quitting after some immediate point. I can’t type anything after ‘clear’ and hitting enter bumps me out of any quasi-remote connection (i.e. it sends me back to a local terminal).

Prometheia avatar Jun 08 '22 03:06 Prometheia

Actually, I don’t think it’s connecting to the Win10 computer after all. There’s no indicator in the bottom-left that says I’m connected to a remote server. And Code never actually says ‘Connected to xxx.xxx.xxx.xxx’ ‘Fingerprint: ‘.

Right. Thanks for letting me know. I think I can get my hands on a Windows computer this week and fix it.

bummoblizard avatar Jun 08 '22 03:06 bummoblizard

Actually, I don’t think it’s connecting to the Win10 computer after all. There’s no indicator in the bottom-left that says I’m connected to a remote server. And Code never actually says ‘Connected to xxx.xxx.xxx.xxx’ ‘Fingerprint: ‘.

The screenshot of the terminal above seems like it’s trying to connect, but quitting after some immediate point. I can’t type anything after ‘clear’ and hitting enter bumps me out of any quasi-remote connection (i.e. it sends me back to a local terminal).

It should be fixed in the latest commit. TestFlight build will be available soon.

bummoblizard avatar Jun 11 '22 08:06 bummoblizard

It should be fixed in the latest commit. TestFlight build will be available soon.

Success! I can connect to my Windows server both over my local network and via my ngrok instance. Nice work!

There does seem to be sporadic crashing when connecting while the ‘Remember credentials’ option is selected. It’ll crash, and then the next time I connect with the option selected it’ll go through. Each subsequent connection is successful after that too.

Prometheia avatar Jun 11 '22 20:06 Prometheia

There does seem to be sporadic crashing when connecting while the ‘Remember credentials’ option is selected. It’ll crash, and then the next time I connect with the option selected it’ll go through. Each subsequent connection is successful after that too.

Interesting. I'll make sure it's fixed before it's released on the App Store. Thanks!

bummoblizard avatar Jun 12 '22 03:06 bummoblizard

Hi @bummoblizard, thanks for the great work on the app.

I would like to know if ssh through a jump server is already supported.

E.g.ssh -i .ssh/id_rsa -o ProxyCommand="ssh -W %h:%p [email protected] -i .ssh/id_rsa" user@my-server

If not, is this possible/feasible?

Kabongosalomon avatar Mar 10 '23 11:03 Kabongosalomon