The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> BSD Help
|
problem with ssh and sftp
Discuss problem with ssh and sftp in the BSD Help forum on Dev Shed. problem with ssh and sftp BSD Help forum discussing all BSD based operating systems including FreeBSD, OpenBSD, NetBSD, and more. BSD refers to the distribution of UNIX originally developed by the University of California at Berkeley.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 9th, 2002, 01:15 AM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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?
|

February 9th, 2002, 01:19 AM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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, 02:42 AM
|
|
Contributing User
|
|
Join Date: May 2000
Location: Edmonton, AB, Canada
Posts: 44
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
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, 03:25 PM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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
|

February 9th, 2002, 03:31 PM
|
|
Contributing User
|
|
Join Date: May 2000
Location: Edmonton, AB, Canada
Posts: 44
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
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, 05:17 PM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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, 05:21 PM
|
|
Contributing User
|
|
Join Date: May 2000
Location: Edmonton, AB, Canada
Posts: 44
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
Hmmm? Are you asking how to put the debug output into a file? Try ./sshd -ddd > /some/directory/yourfile
|

February 9th, 2002, 09:19 PM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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 10:08 PM.
|

February 9th, 2002, 11:21 PM
|
|
Contributing User
|
|
Join Date: Oct 2001
Posts: 310
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
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 04:01 PM.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|