Background
When setting up compute clusters on Crusoe Cloud, a common use case is to use ssh forwarding to be able to connect to a VM, and from that VM connect to other machines in your VPC. This double hop scenario is common for system admins to manage VMs in their cluster.
Pre Requirements
- Local terminal set up with OpenSSH access (MacOS comes preinstalled with this. Windows Machines will require separate setup)
- Multiple VMs created in Crusoe Cloud with your ssh public key added in the ~/.ssh/authorized_keys directory on all the VMs you wish to access
Steps
- On your local terminal, set up your ~/.ssh/config file to allow for ssh Forwarding
-
# cat ~/.ssh/config
Host *
User ubuntu
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
-
- Add your specific key using ssh-add with the path to your private key
-
# ssh-add ~/.ssh/id_rsa
-
- Verify that ssh key was added successfully
-
# ssh-add -l
-
- ssh to an instance on Crusoe Cloud, and verify that you can ssh from that instance to another VM in the same VPC over Internal IP.
-
# ssh 216.86.169.79
...
# ubuntu@slurm-compute-node-0:~$ ssh ubuntu@172.27.55.215
...
# ubuntu@slurm-compute-node-1:~$
-
Additional Resources
Comments
0 comments
Please sign in to leave a comment.