Monday, 6 April 2009

Using Alias

I am forever using ssh to do something or other on another box from my laptop. Of course, whenever I need to run an X application to display on my machine I find out that I have forgotten to type the -X argumentssh -X 192.168.blahSo setting up alias to do this for me by default was the ideal solution.

First of all, edit ~./bashrc and uncomment the following lines:if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
Then create a file ~/.bash_aliases to insert your alias comands.alias ssh='ssh -X'That's it. As an aside: for ssh -X to work, ensure you have the directive X11Forwarding yes enabled in /etc/ssh/sshd_config on the remote machine.

Alias in action

No comments: