A step-by-step guide to setting up a cloud VPS, securing it with SSH keys, and accessing Claude Code on the go on your Phone.
You cannot run Claude Code directly on a phone's native operating system, so you need to set up a Virtual Private Server (VPS) to host it.









Once the VPS is running, access the terminal via the browser button on the Hostinger dashboard to perform initial security setup.

Now you're in. Type claude to verify Claude Code is available.

You now have access to Claude on your VPS. Select your login method and authenticate.



Exit Claude and return to the terminal so we can run some security commands.

Block brute force attacks:
sudo apt install fail2ban -y

Check that it is running:
systemctl status fail2ban

Enable the firewall and allow SSH traffic (port 22):
sudo ufw allow 22 && sudo ufw enable
sudo may not be strictly necessary, but it is good practice.
To access this terminal from your phone, you need a terminal application.

Label the connection (e.g., "Claude Code").
Scroll down and create an identity for username and password (same as your server password).

root and the password you created during VPS setup.You should then be able to login to the server from your phone.

claude to verify Claude Code is working.To improve security and convenience, replace password logins with SSH keys.
First, exit Claude Code and close the connection.


Once the key has been generated, hold down your finger on the new key and tap "Share."
Once the key works, disable password access entirely to harden security.
Remove the password from the identity you created in Termius. If you cannot find your identity, check your keychains (accessible from the Termius main menu).

Run the following command to modify the SSH configuration and restart the service:
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication no/' \
/etc/ssh/sshd_config /etc/ssh/sshd_config.d/*.conf && \
sudo systemctl restart ssh

To ensure your coding session doesn't die when your phone locks or loses signal, use tmux (a terminal multiplexer).
apt install tmux

tmux to launch a persistent session.
This starts a new session. Launch Claude Code inside it.

Now from Termius, connect to your VPS from your phone and type tmux a to attach to the most recent session.



Same session visible on the desktop terminal connected to the VPS:

Control + B followed by D.
tmux a (or tmux a -t [session_name]).Out of the box, tmux may not allow scrolling within the Termius app.
Copy and paste the following command in your terminal:
echo "set -g mouse on" >> ~/.tmux.conf && tmux source-file ~/.tmux.conf
Start a new named session on the VPS:

Access the same session from Termius on your phone:


And now you can scroll on your phone:

tmux sessions on your phone.Join Vibe Coding Academy and get step-by-step tutorials, direct developer support, and everything you need to launch your first app.
Become a Founding MemberOnly $97/month • Cancel anytime