AI DevelopmentContainer Instances
SSH Access to Container Instances
A guide to enabling and accessing SSH for container instances, including prerequisites, setup procedures, and key generation.
Prerequisites
- The container instance has been created successfully and the status is running.
- The local host has generated an SSH key pair. If not, refer to the section Generate SSH Key Pair.
Procedure
- 
View and Record SSH Public Key - For Windows systems, the SSH public key file is located at c:\user\<user_name>\.ssh\id_rsa.pub.
- For Linux or macOS, execute cat ~/.ssh/id_rsa.pubto view the public key.
 
- For Windows systems, the SSH public key file is located at 
- 
Log in Using Jupyter - Access the container instance using Jupyter.
 
- 
Install openssh-serverService- Open the terminal in the container instance and run:
 
- Open the terminal in the container instance and run:
- 
Verify Installation - Check the SSH process:
- Verify the installation package:
 
- Check the SSH process:
- 
Start the openssh-serverService- Run:
 
- Run:
- 
Check the Service Status - Verify the service is running:
 
- Verify the service is running:
- 
Ensure SSH Path Exists - Run:
 
- Run:
- 
Add Public Key to authorized_keys- Append the local host's SSH public key to the container instance:
- Verify the public key:
 
- Append the local host's SSH public key to the container instance:
- 
Copy SSH Command - From the container instance list page, click More Actions and select Copy SSH Command.
 
- 
Access the Container Instance via SSH - Open the terminal on the local host and use the copied SSH command.
 
- 
Install Daemons to Prevent SSH Disconnection - Run:
 
- Run:
Appendix
Generate SSH Key Pair
- 
Check for Existing SSH Key - On Windows: c:\user\<user_name>\.ssh\id_rsa.pub
- On Linux/macOS: ~/.ssh/id_rsa.pub
 
- On Windows: 
- 
Generate New SSH Key - If no SSH key exists, run:
- Press Enter to confirm default settings during the setup.
 
- If no SSH key exists, run:
- 
View and Copy Public Key - Navigate to the SSH key directory and run:
 
- Navigate to the SSH key directory and run: