SSH to VM
How to connect to your Orka VM via SSH.
If your macOS VM has Remote Login
enabled, you can connect to it via SSH and perform remote operations through the terminal.
On this page, you will learn how to:
- Get the IP and SSH port for your VM.
- How to SSH to the VM.
- How to transfer files via SSH.
Quick command summary
orka vm status
ssh <macOS user>@<VM IP> -p <SSH PORT>
scp -P <SSH PORT> <PATH TO LOCAL FILE> <macOS user>@<VM IP>:<REMOTE PATH>
Prerequisites
- Connect to your Orka environment via VPN.
- Log in with your Orka user.
- Create and deploy an SSH-enabled VM. You can use an SSH-enabled image or you can create a VM and then enable SSH. See Creating an SSH-Enabled Image.
Step 1: Get the IP and SSH port
- Run the following command:
orka vm status -v <NAME> -y
You should see a similar output:
Deployed
Name <NAME>
ID <VM_ID>
Owner [email protected]
Node macpro-2 (UP)
IP 10.10.10.5
VNC :5999
Screenshare :5900
SSH :8822
vCPU|CPU 6|6
RAM 15GB
Base image Mojave.img
Status running
Step 2: SSH to the VM
- Run the following command:
ssh <macOS_user>@<VM_IP> -p <SSH_PORT>
For example: ssh [email protected] -p 8822
If prompted, confirm that you want to add the IP and port combo to your known hosts.
TIP: Transfer files?
To transfer files, you can use the following command without logging in via SSH first:
scp -P <SSH_PORT> <PATH_TO_LOCAL_FILE> <macOS_user>@<VM_IP>:<REMOTE_PATH>
For example:
scp -P 8822 /Users/foobar/Downloads/file.zip [email protected]:/Users/admin/Downloads
What's next
While logged in via SSH, perform actions on the VM from the terminal. For example, create or remove files and directories, run setup scripts, install CLI package managers and packages, and so on.
Updated about 4 years ago