Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Two ssh servers on one IP?



On 01/08/07, Darren Cook <darren@example.com> wrote:

> Is my only option to edit known_hosts each time I want to switch the
> server I log in to?  (or log in to one, then log in to the other using
> the private IP address)

Nope; ssh has you covered. You need to drop something like this into
your ${HOME}/.ssh/config:

Host one-oh-oh-one
        HostKeyAlias            one-oh-oh-one
        HostKeyAlgorithms    ssh-dss
        HostName                 1.2.3.4
        Port                          1001
Host one-oh-oh-two
        HostKeyAlias            one-oh-oh-two
        HostKeyAlgorithms    ssh-dss
        HostName                 1.2.3.4
        Port                          1002

SSH_CONFIG(5) has more info, but you knew that. ;)

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links