Guide · Remote access from iOS

How to SSH into a server from iPhone.

An iPhone can act as an SSH client for a Linux server, a Mac, a NAS or a cloud VM. Here is what you need, how to connect and how to check that you reached the right machine.

Works with CodeShell for iPhone · iOS 18 or later

SSH gives you a command-line session on another computer over an encrypted connection. Your commands run on that remote computer, not on the iPhone. Before opening an SSH app, make sure the remote computer is running an SSH server and is reachable from your phone.

You will need the server address (a hostname or IP address), an account name and its SSH port. Port 22 is the usual default. You also need either that account’s password or an SSH key whose public half has been authorized on the server.

Before you connect.

Check network access

If the server is only on your home network, your iPhone must be on that network or connected through an approved VPN. A private network address will not work from the public internet by itself.

Choose an authentication method

CodeShell accepts passwords and Ed25519, RSA or ECDSA private keys. For key authentication, the matching public key must already be installed for your account on the server.

Know the host fingerprint

Get the server’s host-key fingerprint from the server or its administrator through a trusted channel. Checking it on the first connection helps prevent connecting to the wrong machine.

Connect with CodeShell.

The same basic information applies to most SSH clients. CodeShell keeps the saved connection ready for your next visit.

  1. Create a connection

    Enter the server address, SSH port and username in CodeShell. Give the connection a name you will recognize.

  2. Add your password or key

    Choose password authentication, import an existing private key, or create an Ed25519 key and authorize its public key on the server.

  3. Check the host key

    On first connection, compare the shown fingerprint with the trusted fingerprint for your server. If CodeShell later reports that the host key changed, investigate the change before reconnecting.

  4. Start with a read-only command

    Once connected, try pwd to see your remote working directory or uname -a to identify a Unix-like server. The terminal’s extra key row provides Esc, Tab, Ctrl and arrow keys.

Common questions.

Do I need to expose port 22 to the internet?

No. If you are connecting to a server on a private network, a VPN can provide access without making SSH publicly reachable. Use the network arrangement approved for your server.

Can I SSH from iPhone to a Mac?

Yes, if the Mac has Remote Login enabled, is reachable from the iPhone and your account is permitted to log in.

What if a long task loses its connection?

CodeShell Pro offers persistent sessions backed by tmux on the server, so you can reconnect to a shell after disconnecting. The server must remain running.