Help with Linux Server Hacks book: Turbo-mode SSH logins
OUTSTANDING BOOK :study: if you guys haven't read it yet!!
However, I have a question. pg 141 in the SSH chapter, with the ln -s ssh-to server1 command... Works GREAT -if- the local user and the remote users are the same name. Otherwise it doesn't work. e.g. I can't be logged in as tobe on server a, and then log in as othername on server b using this ssh-to trick. Surely someone has found a solution? |
Did you try specifying the user name like:
ssh username@server1 |
That DOES work.... however-
The shortcut that this page in this book was talking about a script that automatically executes "ssh username@server1" when you type just: "server1" Doesn't work when your local username is different than remote username. But if it happens to be, it works SWEET. It's a short one line script from that book. I can't remember exactly what it says, as I'm not at my linux machine :P -T |
Well you can do this another way. Just create aliases in your .bashrc (or whatever file sets aliases for your shell.)
examples: alias server1="ssh userA@server1.com" alias server2="ssh userB@server2.com" I have about four of these aliases. Instead of 'server1' I just use the first letter of the server's name. They are all for different usernames. |
Dang it. The answer's always right in front of me. an Alias. d'0h.
Thanks.. That'll work just fine! T |
All times are GMT -5. The time now is 04:32 PM. |