Creating an alias for my ssh command to my proxy server I added the line like this line to ~/.bashrc
alias linkname=`ssh -D 7777 -p 2299 username@example.com`
Then to test it I fired up a new shell and, to my suprise, after a second or two of delay, it showed a login screen for my server at example.com. Confused I remarked out the new line and started another new shell. This did the expected thing and showed a local login screen. Examination of my new line in .bashrc showed that I had used backticks instead of single quotes. I changed the entry to
alias linkname='ssh -D 7777 -p 2299 username@example.com'
This now works as I intended and logs me into the remote server.
Can someone explain what happened and why? Are backticks part of the syntax for an alias? Are there any interesting tricks I can use with them?
Bookmarks