My jail can not ssh..

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Sep 16 01:07:35 PDT 2003


On Tue, Sep 16, 2003 at 04:16:31AM +0800, maillist bsd wrote:

> I am just testing jail on my FreeBSD4.8-stable box, i found i can not ssh to the jail environment, but i can telnet to jail environment, the sshd is running both inside and outside jail.  What's the problem.

This is freebsd-questions at ... material, rather than freebsd-hackers at ...

I suspect that your problem is that the sshd(8) in your host and jail
environments are both binding to IN_ADDR_ANY.  That means both daemons
are fighting over the loopback interface (at least).

Cure is to tell sshd which interfaces to bind to explicitly.  So,
assuming your host environment uses 192.168.0.1 and your jail uses
192.168.0.2, then add:

    ListenAddress 127.0.0.1
    ListenAddress 192.168.0.1
    ListenAddress ::1

to /etc/ssh/sshd_config in the host environment, and 

    ListenAddress 192.168.0.2

to /etc/ssh/sshd_config in the jail environment.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030916/dc63977e/attachment.bin


More information about the freebsd-hackers mailing list