I access a server using ssh by typing this line:
Code: Select all
ssh -l username hostname "some commands"Now, I've read about making an "alias" to the host providing this functionality:
Code: Select all
ssh hostaliasincludingusername "some commands"http://classes.cs.kent.edu/sce/ssh.html
Cut from that page:
Code: Select all
Using SSH on Linux/UNIX
Students can access loki over a network using the full Internet name: loki.mcs.kent.edu. They would typically ssh into loki with X-Window tunneling enabled. The command to do this is:
ssh -X username@loki.mcs.kent.edu
Where username is your username on loki. The -X flag provides for X-Window tunneling.
You then have secure shell access to loki. In addition, any X-Window programs that you start in loki shell will be display, securely of course, on your local X-Windows server (the X-Windows that is running on your local computer).
ssh is very configurable and the above command can be easily shortened by configuration to:
ssh loki
To do this put the following in your ssh configuration file:
loki:
Host loki.mcs.kent.edu
User username
ForwardX11 yes
Check your documentation, using man or info on ssh, to see where this is.I want to add this functionality to my servers. Please, tell me which config file I should use. And if the example above (loki) is faulty, please correct it. I am getting nowhere by myself.
Thanks