Accessing VMs with SSH
You can use a secure shell (SSH) connection to remotely access a Linux VM running in Skytap Cloud.
An SSH connection requires:
- An open SSH port (port 22) on the VM network adapter
- Configuration of the VM guest operating system to support SSH access
Once you’ve configured the VM for access, use a terminal emulation client (such as Putty) or an SSH client to connect to the VM.
Configuring a VM for SSH access
To configure a VM for SSH access
- Within Skytap Cloud, open SSH port (port 22) on the VM network adapter
Create a published service for SSH Server (port 22).
This allows access to port 22 on the VM over the public Internet.
Use an existing public IP address or VPN connection.
- If a public IP address is attached to the VM, Skytap Cloud allows connections from the public Internet to the VM on all ports.
- If the VM is connected to a VPN, Skytap Cloud allows connections from the VPN to the VM on all ports.
Configure the VM guest operating system to support SSH access. The steps vary, depending on the guest operating system. Generally, you need to:
- Verify that port 22 is open on the VM operating system firewall.
Install and run an SSH server.
Example: OpenSSH on an Ubuntu VM
- Install open SSH:
sudo apt-get install openssh-server
- Confirm that SSH daemon (
sshd) is running:
ps -aef | grep sshd
- Try to connect:
- Install open SSH:
- (Optional, but recommended) Set a strong password for any user accounts on the VM. The steps vary, depending on the guest operating system.
Connecting via SSH
To connect to the running VM
Locate the address of the SSH service
Port opening type Address format Public IP address attached to VM
For example: 18.104.22.168:22
VM attached to a VPN
<vm-nat-ip-address>:22(if the VPN is NAT-enabled)
For example, 10.0.0.1:22
For example: services-apac.cloud.skytap.com:24908
(For help, see Adding a published service to a VM)
- Use the address in a terminal emulation client (such as Putty) or use the following command line to access the VM directly from your desktop SSH client:
ssh -p <port> user@<ip-address-or-hostname>
Public IP address example:
ssh -p 22 email@example.com
Published service example:
ssh -p 24908 firstname.lastname@example.org
- For more information about other VM access methods, see Accessing VMs.
- To see the IP addresses and port ranges used by published services, see What IP addresses and port ranges does Skytap Cloud use?