Skip to main content
Version: 1.12

SSH Server

As part of enabling your development container, okteto up performs the following steps:

  • A minimalist SSH server is injected into your development container
  • A port forward is created from a local port to port 22 of the development container
  • A host entry is added to your local .ssh/config file with the following values:
Host MANIFEST_NAME.okteto
HostName localhost
Port PORT
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

Use the remote field to configure the local port where the SSH server is exposed.

The SSH server is used by okteto up to run remote commands and forward ports from/to your development containers. The SSH server makes it possible to integrate your development container with IDEs that support remote development, such as VS Code, PHPStorm or PyCharm.

Connect using SSH

Once the development container is up and running, you can SSH into it with the following command:

$ ssh -P PORT localhost

You can also SSH using the host entry added to your local SSH config:

$ ssh MANIFEST_NAME.okteto

Secure by default

When you run okteto up the first time, Okteto will create a SSH key pair for you and save it at $HOME/.okteto/id_rsa_okteto and $HOME/.okteto/id_rsa_okteto.pub. The SSH server launched in your development container will be automatically configured to use these keys for authentication.