Created
April 15, 2025 17:21
-
-
Save adityak714/2997bde63f7d6a599097d0279fe946be to your computer and use it in GitHub Desktop.
Quickly SSH into servers for frequent sign-ins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host my-vm | |
HostName 129.9.9.9.9 # replace with the IP of your server, or the address | |
User ubuntu # the user to sign in to | |
IdentityFile ~/.ssh/my-vm.key # if a key is needed to authenticate | |
# Make replicas of the above block if more VMs to configure | |
# The file should be named as "config" (just that), and stored in ~/.ssh/ directory. | |
# Learned from: https://linuxize.com/post/using-the-ssh-config-file/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helped me sign-in quickly to VMs that I needed to access several times, without having to remember their exact addresses, and writing the long command
ssh -i ~/.ssh/my-key.key ubuntu@129....
everytime. Hope this helps others also!