Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Second sshd - errors

  • 12-04-2006 10:44am
    #1
    Registered Users, Registered Users 2 Posts: 59 ✭✭


    Hello all,

    Well I started a second sshd, on a suse 10 machine, when I try to log in from my machine I get this malarky.......

    me@me:~> ssh -D 9999 me@server.domain
    Password:
    bind: Address already in use
    channel_setup_fwd_listener: cannot listen to port: 9999
    Could not request local forwarding.
    Last login: Wed Apr 12 11:33:04 2006 from me.domain
    Have a lot of fun...

    Whats the deal? Am I doing something wrong?

    Any help appreciated.........


Comments

  • Registered Users, Registered Users 2 Posts: 1,193 ✭✭✭liamo


    Whats the deal?
    You're telling ssh to forward port 9999 and ssh is telling you that it can't bind to port 9999 because it's in use.
    Am I doing something wrong?
    That depends. Do you want to forward port 9999?

    Regards,

    Liam


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    What are you trying to do?

    The -D 9999 requires setup on your local machine.

    If you're running sshd on the suse box at port 9999,
    the command should be ssh -p 9999 me@server.domain

    Curious,
    NiallB


  • Registered Users, Registered Users 2 Posts: 59 ✭✭cmo


    liamo wrote:
    You're telling ssh to forward port 9999 and ssh is telling you that it can't bind to port 9999 because it's in use.

    That depends. Do you want to forward port 9999?

    Regards,

    Liam

    I am trying to log into the machine on port 9999 , I dont think I want to forward it, really I want to be able to log in on 22 and 9999 --- Edit* niallbs tip helped me to get it.......
    niallb wrote:
    If you're running sshd on the suse box at port 9999,
    the command should be ssh -p 9999 me@server.domain

    Ahh tried that, works a treat actually thanks....... ! :) fw started blocking 9999 and that tipped me off, thanks again.........


  • Registered Users, Registered Users 2 Posts: 1,193 ✭✭✭liamo


    I want to be able to log in on 22 and 9999

    Glad to hear that you got sorted.

    Although you've got your problem licked, here's another solution for you to think about. I want to log in on ports 22 and 24 so I use redir to redirect traffic from port 24 to port 22.

    The following command "redir --lport=22 --cport=24 &" in rc.local saves me from starting a second instance of sshd.

    Regards,

    Liam


  • Registered Users, Registered Users 2 Posts: 59 ✭✭cmo


    liamo wrote:
    Glad to hear that you got sorted.

    Although you've got your problem licked, here's another solution for you to think about. I want to log in on ports 22 and 24 so I use redir to redirect traffic from port 24 to port 22.

    The following command "redir --lport=22 --cport=24 &" in rc.local saves me from starting a second instance of sshd.

    Regards,

    Liam

    cool, thanks for the tip ill make a note of that.......


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Sometimes you do want a second sshd though.
    I usually test a new build of sshd on a high port,
    and leave the old one running for a few minutes
    until I'm certain it's working before switching over.

    xinetd gives you some great options which can perform
    both the second server and the redirection solutions.
    Save one of these examples in /etc/xinetd.d/
    service ssh-9999
    {
            disable = no
            socket_type     = stream
            protocol        = tcp
            port            = 9999
            type            = UNLISTED
            wait            = no
            user            = root
            server          = /usr/sbin/sshd
            server_args     = -i -b 1024
            log_on_failure  += USERID
    #       only_from       = 127.0.0.1 192.168.0.0/24
    }
    
    or
    service ssh-redir
    {
            disable = yes
            socket_type     = stream
            protocol        = tcp
            port            = 9999
            type            = UNLISTED
            user            = root
            wait            = no
            redirect        = [i]192.168.0.1[/i] 22
            log_on_success += USERID  HOST EXIT
            log_on_failure += USERID HOST ATTEMPT
    }
    

    The second one is disabled - edit the required IP address, and then set disable = no
    NiallB


Advertisement