Accessing VMs with SSH
You can use a secure shell (SSH) connection to remotely access a Linux VM running in Skytap.
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.
Contents
Configuring a VM for SSH access
To configure a VM for SSH access
- Within Skytap, 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.
or
-
Use an existing public IP address or VPN connection.
- If a public IP address is attached to the VM, Skytap allows connections from the public Internet to the VM on all ports.
- If the VM is connected to a VPN, Skytap 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.
- Install open SSH:
sudo apt-get install openssh-server
- Confirm that SSH daemon (
sshd
) is running:ps -aef | grep sshd
- Try to connect:
ssh localhost
- 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 <public-ip-address>:22
For example: 128.128.128.128:22VM attached to a VPN <vm-ip-address>:22
or<vm-nat-ip-address>:22
(if the VPN is NAT-enabled)
For example, 10.0.0.1:22Published service <public-address-of-published-service>
For example: services-emea.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 user@128.128.128.128
Published service example:
ssh -p 24908 user@services-emea.skytap.com
Related articles
- 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 use?