LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Help with Linux Server Hacks book: Turbo-mode SSH logins (https://www.linuxquestions.org/questions/linux-security-4/help-with-linux-server-hacks-book-turbo-mode-ssh-logins-122680/)

ToBe 12-04-2003 11:00 AM

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?

Capt_Caveman 12-04-2003 12:11 PM

Did you try specifying the user name like:

ssh username@server1

ToBe 12-19-2003 10:36 PM

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

mac_phil 12-20-2003 12:42 PM

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.

ToBe 12-21-2003 11:39 AM

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.