+ Reply to Thread
Results 1 to 2 of 2
Like Tree2Likes
  • 2 Post By The Real Rebel

Thread: Centos dev fix

  1. #1
    Adam01 is offline x10 Sophmore Adam01 is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Essex, England
    Posts
    114

    Centos dev fix

    If any of you use centos, you'l may find that on reboots you get the ssh message, "Server refused to alocate pty". An error only to be fixed by lxadmin's dev fix.

    Eventually I found the fix for command line use, which I put into the sshd service manager so it fixes it self without using lxadmin.

    To apply a automatic fix, open up the file:
    /etc/rc.d/init.d/sshd


    Then find the start function (half way down)
    It should look something like this
    Code:
    start()
    {
        # Create keys if necessary
        do_rsa1_keygen
        do_rsa_keygen
        do_dsa_keygen
        rm /dev/null
        cp -af /etc/localtime /var/empty/sshd/etc
        echo -n $"Starting $prog: "
        $SSHD $OPTIONS && success || failure
        RETVAL=$?
        [ "$RETVAL" = 0 ] && touch /var/lock/subsys/sshd
        echo
    }
    After the { , add these following lines:

    Code:
    echo Fixing dev and pty...
    mknod /dev/null c 1 3
    chmod 666 /dev/null
    /sbin/MAKEDEV pty
    /sbin/MAKEDEV tty
    echo Done.
    Then the next time sshd gets started/restarted, that fix will be applied.
    Last edited by Adam01; 12-30-2009 at 11:47 AM.

  2. #2
    The Real Rebel's Avatar
    The Real Rebel is offline x10 Lieutenant The Real Rebel is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Ireland
    Posts
    336

    Re: Centos dev fix

    Nice tutorial,
    Might need this on another server of mine xD
    dinomirt96 and karimirt47 like this.

+ Reply to Thread

Similar Threads

  1. Apache/cPanel page NOT CentOS
    By Macaws in forum Free Hosting
    Replies: 0
    Last Post: 11-22-2008, 09:08 AM
  2. Replies: 0
    Last Post: 11-22-2008, 08:49 AM
  3. Apache / CentOS test page
    By markhere in forum Free Hosting
    Replies: 1
    Last Post: 11-22-2008, 01:23 AM
  4. If you get the Apache / CentOS test page...
    By Christopher in forum Free Hosting
    Replies: 0
    Last Post: 11-22-2008, 12:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers