Which options exist for SSH tunneling clients on iOS?
I need a solution that will work without jailbreaking, but answers that include that can help others are welcome but just might not be selected as the answer.
On Linux and on OSX, I use ssh on the command-line to open ssh tunnels so I can run client-server applications securely.
I need to do the equivalent on ios (run some kind of tunnel in the background, while I run a client application through that tunnel).
What tools or options exist and listing supported iOS versions would be even more helpful if you can provide that level of detail.
How can I set up a ssh tunneling service on iOS?
Solution 1:
iSSH supported opening tunnels. For example, I can set a tunnel on local port 4444 that points to an IP address and port 80. Opening localhost:4444 in Safari then loads that website through the tunnel. iSSH also has good support for saved configurations and public key authentication.
Under the App Store rules, iSSH is only allowed to keep the connection open for up to 10 minutes in the background, so after 9 minutes or so I'll get a notification and the tunnel will be closed if I don't switch back to iSSH quickly enough.
As of 2015, iSSH isn't available anymore. The same functionality likely exists in other iOS SSH clients, but I haven't tried any myself.
Solution 2:
If you are looking for an application to setup local port forwarding like:
ssh -f -L 3000:talk.google.com:5222 home -N
You could check SSHTunnel, it allows you to easily manage and precisely control your ssh tunnels. Can create and share SOCKS5 proxy (aka Dynamic Port Forwarding) or setup a Local Port Forwarding.
Also, you can manually specify the local port to bind, configure connection timeout, see logs and statistics etc.
Solution 3:
vSSH supports tunneling. You can setup tunneling in the "Port forwarding" section of the connection settings. Local, remote and dynamic (SOCKS proxy) forwarding are supported.
You are able to use tunneling even without opening SSH session (shell permissions are not necessary for ssh user in this case).
Due to iOS limitation the app can work in background only for 10 minutes (iOS 5,6) or 3 minutes (iOS 7). vSSH reminds you about this timeout through Notifications.
Solution 4:
This isn't possible under the current iOS App Store rules (and this is unlikely to change in the foreseeable future). Apps are very limited in what they can do in the background, and keeping the sort of persistent connection that an SSH tunnel requires wouldn't be permitted.
Some apps (such as VNC clients) have built-in SSH tunnelling capability to get around this, but if the apps you're using don't include it, the only option (short of jailbreaking) is to use the built-in iOS VPN capability. It doesn't support SSH, but it does support L2TP/IPSec, PPTP, and some other variants.
Solution 5:
I have it working for a jabber client (sort of) with vssh app to an Ubuntu server. Once the SSH session is open I launch top or glances to keep the session active, but it will seem to go dormant after 3 mins. After that I need to toggle over to the vssh app then back to the jabber client and it will work for another 3 mins. Not the best solution for chatting but it will work in a pinch.