[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SSH help (with a pinch of CVS) -- appending multiple keys in
> Oh, one little hitch is that my user name for CompA is not the same as
> my user name for CompB.
You can add a host section for CompA and CompB to specify the user you want to connect as by default for each.
See the default (commented) /etc/ssh_config (note: NOT sshd_config). You can set your own (copy it first) defaults by creating a file in ~/.ssh called simply 'config'.
Then, the ssh client uses that to setup any special settings for a host you're contacting. For example, the following in ~/.ssh/config:
Host CompA
Port 23456
User UserA
Host CompB
User UserB
ForwardX11 yes
Host *
User AnotherUser
In the above, X11 forwarding would be turned on automatically when connecting to CompB, and would use port 23456 when connecting to CompA. And all other connections would use a username of AnotherUser, not the local machine username.
You can do some wicked kewl stuff with Host and Hostname. e.g. reverse forwarding.
Mike/
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.