Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name ssh connection

Tags:

linux

ssh

I have an SSH connection that I can open without password. I have to name that connection so I can use it like

ssh server

How could I do that?

like image 526
recursiveContradiction Avatar asked Dec 07 '25 09:12

recursiveContradiction


1 Answers

Put this in your ~/.ssh/config:

Host server
Hostname actualServerNameOrIp
User yourUserName

Of course, replace server with the name you want to type when you ssh server, actualServerOrIp with the actual server name or IP address and yourUserName with the name of the user you're allowed to login with on that server.

like image 91
Arkanosis Avatar answered Dec 11 '25 09:12

Arkanosis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!