#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14

    problem with ssh and sftp


    This is pretty strange to me. At first, when I configured /etc/sshd_config then restart ssh. After that, everything went so smoothly which my friends can access in it with their ssh client. For some reason, after reboot and they all can't ever login anymore. It keeps said, the password is incorrect which we haven't ever change ssh key nor our password. Ever, I recreate a new account and ssh key, but it still same result. Also, there have no error in the log so I am kind of lost.

    Here's my /etc/sshd_config looks like this..

    #---------------------------------------------------------
    Port 22
    Protocol 2
    HostDsaKey /etc/ssh/ssh_host_dsa_key
    ServerKeyBits 768
    LoginGraceTime 120
    KeyRegenerationInterval 3600
    PermitRootLogin no
    MaxStartups 10:30:60
    IgnoreRhosts yes
    StrictModes yes
    X11Forwarding no
    PrintMotd yes
    KeepAlive yes
    SyslogFacility AUTH
    LogLevel DEBUG
    RhostsAuthentication no
    RhostsRSAAuthentication no
    RSAAuthentication yes
    PasswordAuthentication no
    PermitEmptyPasswords no
    CheckMail yes
    Subsystem sftp /usr/libexec/sftp-server
    #---------------------------------------------------------

    I created the dsa key follows:
    $ ssh-keygen -d
    $ cat ~/.ssh/id_dsa.pub > ~/.ssh/authorized_keys2

    Are there anything that I am missing with ssh or configure it in wrong way?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14
    BTW: What did I change or modify right before reboot? All I did was enable the Quota in /etc/rc.conf then reboot. That's all what I had done..
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Edmonton, AB, Canada
    Posts
    44
    Rep Power
    15
    Is sshd running? Maybe you should try running it with the debug switch on, to see what errors it gives you.

    For OpenSSH look at the man pages. Basically, run ./sshd -ddd

    I'm not sure how you'd do it on other sshd versions.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14
    I ran sshd as debug, so here it's...

    debug1: sshd version OpenSSH_2.9 FreeBSD localisations 20011202
    debug1: read PEM private key done: type DSA
    debug1: private host key: #0 type 2 DSA
    debug1: Bind to port 22 on 0.0.0.0
    Bind to port 22 on 0.0.0.0 failed: Address already in use.
    Cannot bind any address.

    Well, I already check in the man page several times and it doesn't ever help me. Maybe, it's me that I misunderstand it. Umm, I should disable Quota and see what happens.

    Thanks,
    Mezz
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Edmonton, AB, Canada
    Posts
    44
    Rep Power
    15
    You're getting that message because sshd is already running, and using port 22. Kill all instances of sshd, then run it with the debugging flags. It should then run in a console. Then try to connect over ssh, and see what messages are printed to the console.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14
    ok, when I debug and where does it prints the debug on file? It's too long to copy by type from screen.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Edmonton, AB, Canada
    Posts
    44
    Rep Power
    15
    Hmmm? Are you asking how to put the debug output into a file? Try ./sshd -ddd > /some/directory/yourfile
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14
    I already tried before you answered and it doesn't ever works..

    I did follows:

    sshd -d > ~/sshd_debug

    Then it's empty there, which it's login as root by su command.
    Last edited by mezz; February 9th, 2002 at 11:08 PM.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    14
    Ok, I kind of find the problem... I think, it has something to do with tunneled clear text and unclear text..

    When I changed from follows:

    PasswordAuthentication no

    to

    PasswordAuthentication yes

    The result looks like this follows:

    login as: mezz
    otp-md5 259 me5816 ext
    S/Key Password:
    Access denied
    mezz@65.27.xxx.xxx's password:

    At second login, it allowed me to login, which I don't really understand what's wrong with tunneled unclear text?
    Last edited by mezz; February 11th, 2002 at 05:01 PM.

IMN logo majestic logo threadwatch logo seochat tools logo