February 9th, 2002, 02:15 AM
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..
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?
February 9th, 2002, 02:19 AM
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..
February 9th, 2002, 03:42 AM
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.
February 9th, 2002, 04:25 PM
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.
February 9th, 2002, 04:31 PM
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.
February 9th, 2002, 06:17 PM
ok, when I debug and where does it prints the debug on file? It's too long to copy by type from screen.
February 9th, 2002, 06:21 PM
Hmmm? Are you asking how to put the debug output into a file? Try ./sshd -ddd > /some/directory/yourfile
February 9th, 2002, 10:19 PM
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.
February 10th, 2002, 12:21 AM
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:
The result looks like this follows:
login as: mezz
otp-md5 259 me5816 ext
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.