Search code examples
sshvisual-studio-codevscode-remote

VSCode SSH remote friendly host name


I have this .config file for SSH hosts:

Host 10.32.1.43
  HostName 10.32.1.43
  User root
  ForwardAgent yes
Host 10.32.0.39
  HostName 10.32.0.39
  User administrator
  ForwardAgent yes

Can I give more friendly names to my machines, instead of remembering which of them is the Ubuntu machine, and which is the CentOS?


Solution

  • If you change the name after "Host", it changes the name displayed in VSCode and normal ssh commands

    Host {machine_name}
       HostName {your_ip}
       User {your_username}
    

    Using this example config file, you can do: ssh {machine_name}