Find the answer to your Linux question:
Results 1 to 3 of 3
hi i connect with ssh to a lot of servers every day and i use this syntex: ssh root servername (with at sign instead of smile, cuze the forum think ...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    6

    how to make alias to ssh for different servers

    hi

    i connect with ssh to a lot of servers every day and i use this syntex:

    ssh rootservername
    (with at sign instead of smile, cuze the forum think that i posting url and i cant post url before i have 15 messeges lil)

    the "ssh root" is always the same, the only thing that change is the server name/ip.
    i tried to make alias to ssh but i cant make alias with option to change the server name.

    that what i done, alias ss='ssh root'
    but there is no option to write the server name. a regular alias with specific server working great but how i make a variable server address.

    i use centos and red hat enterprise linux 6x

    thanks

  2. #2
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Have you tried:
    alias ss='ssh -l root '
    Or simply configure root as default user:
    UNIX man pages : ssh_config (5)

    SSH
    .ssh/config

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    6
    working great thanks

Posting Permissions

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