Calmcode - ssh: config

config

1 2 3 4 5 6 7 8 9

It's much better to set up a configuration file for ssh. That way, we won't need to remember ip-adresses. We can assign a name to a server and we can automate the process of making a connection.

Here's the configuration used in the video for the ~/.ssh/config-file:

Host homeserver
    Hostname 192.168.1.36
    User vincent
    IdentityFile /Users/vincent/.ssh/id_demo_purposes

In general, you want to stick to the following recipe for ssh-config files.

Host <your-chosen-name>
    Hostname <ip-adress>
    User <username>
    IdentityFile <path-to-private-file>

SSH

With this configuration set, you can now simply ssh via;

ssh homeserver