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 ...
- 01-24-2012 #1Just 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 root
servername
(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
- 01-24-2012 #2Linux 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
- 01-25-2012 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 6
working great thanks


Reply With Quote