SSH

Using a different SSH user than root

The default SSH user is root, but you can change it using ssh/user:

ssh:
  user: app

If you are using non-root user (app as above example), you need to bootstrap your servers manually, before using them with Kamal. On Ubuntu, you’d do:

sudo apt update
sudo apt upgrade -y
sudo apt install -y docker.io curl git
sudo usermod -a -G docker app

Using a different SSH port

The default SSH port is 22, but you can change it using ssh/port:

ssh:
  port: 2222

Using a proxy SSH host

If you need to connect to server through a proxy host, you can use ssh/proxy:

ssh:
  proxy: "192.168.0.1" # defaults to root as the user

Or with specific user:

ssh:
  proxy: "[email protected]"

Also if you need specific proxy command to connect to the server:

ssh:
  proxy_command: aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --region=us-east-1 ## ssh via aws ssm

Using a different SSH log level

ssh:
  log_level: debug

Valid levels are debug, info, warn, error and fatal (default).