Professional Web Applications Themes

Trouble with sshd in jail - FreeBSD

I have some trouble with sshd in jail. This is description of the problem: I have host system based on FreeBSD 5.1 Release with IP 161.66.11.1 Futher I do these steps for creating jail on host system: cd /usr/src mkdir -p /jail make world DESTDIR=/jail cd etc make distribution DESTDIR=/jail mount_devfs devfs /jail/dev cd /jail ln -sf dev/null kernel OK. That's easy. Next step I edit /etc/rc.conf by adding/editing some lines: sendmail_enable="NO" sshd_enable="YES" syslogd_flags="-ss" and /etc/ssh/sshd_config : ListenAddress 161.66.11.1 OK. I do #sockstat and get only: root sendmail 361 4 tcp4 127.0.0.1:25 *:* root sshd 355 3 tcp4 161.66.11.2:22 *:* ...

  1. #1

    Default Trouble with sshd in jail

    I have some trouble with sshd in jail. This is description
    of the problem:

    I have host system based on FreeBSD 5.1 Release with IP
    161.66.11.1 Futher I do these steps for creating jail on
    host system:

    cd /usr/src
    mkdir -p /jail
    make world DESTDIR=/jail
    cd etc
    make distribution DESTDIR=/jail
    mount_devfs devfs /jail/dev
    cd /jail
    ln -sf dev/null kernel

    OK. That's easy. Next step I edit /etc/rc.conf by
    adding/editing some lines:

    sendmail_enable="NO"
    sshd_enable="YES"
    syslogd_flags="-ss"

    and /etc/ssh/sshd_config :

    ListenAddress 161.66.11.1

    OK. I do #sockstat and get only:

    root sendmail 361 4 tcp4 127.0.0.1:25 *:*
    root sshd 355 3 tcp4 161.66.11.2:22 *:*

    After this doing alias for jail:

    #ifconfig em0 alias 161.66.11.2

    Then I start jail:

    #jail /jail testhost 161.66.11.2 /bin/sh /etc/rc

    Two problems: then jail startup, the message "Starting
    sshd..." stops for 10 min. That's one. Then booting
    proccess continies and finish successfull. Second problem
    is when I try to connect to jail (161.66.11.2) with ssh
    client.
    ---Connect 161.66.11.2...
    ---Login as: root
    AND STOPS!!! For 7-10 min. Than "password" field appears,
    but I have wait so much time...

    That's the problem. Please, help if you can!
    Thank you!!!
    ---------------------------------------------------------
    [url]http://mobile.ngs.ru/games[/url] - Java- ...
    [url]http://love.ngs.ru[/url] -






    musikcom@ngs.ru Guest

  2. #2

    Default Re: Trouble with sshd in jail

    Do you have your resolv.conf and hosts file setup correctly in the jail? I had the same problem yesterday when I moved my jailed system to a new network.

    --
    Anish Mistry

    ----- Original Message -----
    From: [email]musikcomngs.ru[/email]
    Date: Wednesday, February 16, 2005 10:35 am
    Subject: Trouble with sshd in jail
    > I have some trouble with sshd in jail. This is description
    > of the problem:
    >
    > I have host system based on FreeBSD 5.1 Release with IP
    > 161.66.11.1 Futher I do these steps for creating jail on
    > host system:
    >
    > cd /usr/src
    > mkdir -p /jail
    > make world DESTDIR=/jail
    > cd etc
    > make distribution DESTDIR=/jail
    > mount_devfs devfs /jail/dev
    > cd /jail
    > ln -sf dev/null kernel
    >
    > OK. That's easy. Next step I edit /etc/rc.conf by
    > adding/editing some lines:
    >
    > sendmail_enable="NO"
    > sshd_enable="YES"
    > syslogd_flags="-ss"
    >
    > and /etc/ssh/sshd_config :
    >
    > ListenAddress 161.66.11.1
    >
    > OK. I do #sockstat and get only:
    >
    > root sendmail 361 4 tcp4 127.0.0.1:25 *:*
    > root sshd 355 3 tcp4 161.66.11.2:22 *:*
    >
    > After this doing alias for jail:
    >
    > #ifconfig em0 alias 161.66.11.2
    >
    > Then I start jail:
    >
    > #jail /jail testhost 161.66.11.2 /bin/sh /etc/rc
    >
    > Two problems: then jail startup, the message "Starting
    > sshd..." stops for 10 min. That's one. Then booting
    > proccess continies and finish successfull. Second problem
    > is when I try to connect to jail (161.66.11.2) with ssh
    > client.
    > ---Connect 161.66.11.2...
    > ---Login as: root
    > AND STOPS!!! For 7-10 min. Than "password" field appears,
    > but I have wait so much time...
    >
    > That's the problem. Please, help if you can!
    > Thank you!!!
    > ---------------------------------------------------------
    > [url]http://mobile.ngs.ru/games[/url] - Java-???? ??? ??????????? ? ?? ??????...
    > [url]http://love.ngs.ru[/url] - ?????????? ? ????????????
    >
    >
    >
    >
    >
    >
    > _______________________________________________
    > [email]freebsd-questionsfreebsd.org[/email] mailing list
    > [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
    > To unsubscribe, send any mail to "freebsd-questions-
    > [email]unsubscribefreebsd.org[/email]"
    ANISH MISTRY Guest

  3. #3

    Default Re: Trouble with sshd in jail

    On Wed, 16 Feb 2005 11:18:40 -0500, ANISH MISTRY wrote
    > Do you have your resolv.conf and hosts file setup correctly in the
    > jail? I had the same problem yesterday when I moved my jailed
    > system to a new network.
    Or you can just ssh to your host machine and execute the following command:

    jexec <jail id> /path/to/your/shell

    Cheers,

    Jorn
    >
    > --
    > Anish Mistry
    >
    > ----- Original Message -----
    > From: [email]musikcomngs.ru[/email]
    > Date: Wednesday, February 16, 2005 10:35 am
    > Subject: Trouble with sshd in jail
    >
    > > I have some trouble with sshd in jail. This is description
    > > of the problem:
    > >
    > > I have host system based on FreeBSD 5.1 Release with IP
    > > 161.66.11.1 Futher I do these steps for creating jail on
    > > host system:
    > >
    > > cd /usr/src
    > > mkdir -p /jail
    > > make world DESTDIR=/jail
    > > cd etc
    > > make distribution DESTDIR=/jail
    > > mount_devfs devfs /jail/dev
    > > cd /jail
    > > ln -sf dev/null kernel
    > >
    > > OK. That's easy. Next step I edit /etc/rc.conf by
    > > adding/editing some lines:
    > >
    > > sendmail_enable="NO"
    > > sshd_enable="YES"
    > > syslogd_flags="-ss"
    > >
    > > and /etc/ssh/sshd_config :
    > >
    > > ListenAddress 161.66.11.1
    > >
    > > OK. I do #sockstat and get only:
    > >
    > > root sendmail 361 4 tcp4 127.0.0.1:25 *:*
    > > root sshd 355 3 tcp4 161.66.11.2:22 *:*
    > >
    > > After this doing alias for jail:
    > >
    > > #ifconfig em0 alias 161.66.11.2
    > >
    > > Then I start jail:
    > >
    > > #jail /jail testhost 161.66.11.2 /bin/sh /etc/rc
    > >
    > > Two problems: then jail startup, the message "Starting
    > > sshd..." stops for 10 min. That's one. Then booting
    > > proccess continies and finish successfull. Second problem
    > > is when I try to connect to jail (161.66.11.2) with ssh
    > > client.
    > > ---Connect 161.66.11.2...
    > > ---Login as: root
    > > AND STOPS!!! For 7-10 min. Than "password" field appears,
    > > but I have wait so much time...
    > >
    > > That's the problem. Please, help if you can!
    > > Thank you!!!
    > > ---------------------------------------------------------
    > > [url]http://mobile.ngs.ru/games[/url] - Java-???? ??? ??????????? ? ?? ??????...
    > > [url]http://love.ngs.ru[/url] - ?????????? ? ????????????
    > >
    > >
    > >
    > >
    > >
    > >
    > > _______________________________________________
    > > [email]freebsd-questionsfreebsd.org[/email] mailing list
    > > [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
    > > To unsubscribe, send any mail to "freebsd-questions-
    > > [email]unsubscribefreebsd.org[/email]"
    >
    > _______________________________________________
    > [email]freebsd-questionsfreebsd.org[/email] mailing list
    > [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
    > To unsubscribe, send any mail to "freebsd-questions-unsubscribefreebsd.org"
    Jorn Argelo Guest

  4. #4

    Default Re: Trouble with sshd in jail

    Am Mittwoch, 16. Februar 2005 16:35 schrieb [email]musikcomngs.ru[/email]:
    [...]
    > Then I start jail:
    >
    > #jail /jail testhost 161.66.11.2 /bin/sh /etc/rc
    >
    > Two problems: then jail startup, the message "Starting
    > sshd..." stops for 10 min. That's one. Then booting
    This is because the sshd startupscript generates keypairs if they are missing.
    And for that it waits to enter some random data which leads to that long
    timeout even on a fast machine.
    > proccess continies and finish successfull. Second problem
    > is when I try to connect to jail (161.66.11.2) with ssh
    > client.
    > ---Connect 161.66.11.2...
    > ---Login as: root
    > AND STOPS!!! For 7-10 min. Than "password" field appears,
    > but I have wait so much time...
    This is because sshd tries to resolve addresses of connected hosts.
    Fix your DNS or edit /etc/hosts accordingly.

    -Harry

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQBCFMBaBylq0S4AzzwRApXWAKCFtJSC3oOA0E+/XccLPE/dU3phwQCgjNYg
    piUxmzS0kWar2Uh0N98CqwM=
    =MXOx
    -----END PGP SIGNATURE-----

    Emanuel Strobl Guest

Similar Threads

  1. Compiling linux_base in jail fails
    By Viren Patel in forum FreeBSD
    Replies: 1
    Last Post: February 26th, 06:14 AM
  2. Loopback addresses and socket() inside of jail
    By Chad Leigh -- Shire.Net LLC in forum FreeBSD
    Replies: 0
    Last Post: February 18th, 08:27 PM
  3. Replies: 2
    Last Post: February 17th, 07:46 PM
  4. sshd goes catatonic on AIX 5.2 ML1
    By Florian M. Weps in forum AIX
    Replies: 4
    Last Post: August 31st, 03:17 PM
  5. Also won't for me (no sshd)
    By Colin Watson in forum Debian
    Replies: 0
    Last Post: July 8th, 11:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139