Find the answer to your Linux question:
Results 1 to 2 of 2
hi, i know this can be done because i always see people doing it but i cant seem to work out how. instead of typing user@host.com evertime i ssh in, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2005
    Posts
    235

    how how do you alias a ssh host nome?


    hi, i know this can be done because i always see people doing it but i cant seem to work out how. instead of typing user@host.com evertime i ssh in, ive seen people type
    ssh alias
    and it connects to host.com.
    does anyone know what file and to edit it and what it must contain

  2. #2
    Just Joined!
    Join Date
    Aug 2008
    Posts
    7
    man ssh_config
    basically , you need to edit ~/.ssh/config and for a host you want alias as your_alias , you would add

    Host=your_alias
    Hostname=host.com
    User=your_user_name
    #IdentityFile=~/.ssh/home_rsa

    you can then type ssh your_alias
    or simply your_alias if you add the following bash alias in your .bashrc
    alias your_alias='ssh your_alias'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •