OpenWrt Forum Archive

Topic: OpenSSH-Server closes connection

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

dropbear runs without any problems. But since I need SCP/SFTP I installed openssh.
So I disabled dropbear, and moved away all files configured by dropbear.
Then I installed zlib, libssl, openssh-server, openssh-sftp-server.
The installation-scripts run through happily, I can see all files are installed successfully.
But when I try to connect to sshd (which starts perfectly after rebooting), I only get this, from another machine as well as locally:

root@OpenWrt:/# ssh 10.10.10.10
ssh: connection to root@10.10.10.10:22 exited: remote closed the connection

PuTTY just closes its window when connecting.
Can I view a log or something, to find out what is happening?

Can I view a log or something, to find out what is happening?

logread and eventually dmesg

Ciao,
antimac.

logread and eventually dmesg

dmesg doesn't say anything about SSH, I just have a couple of SCSI-messages (because of the USB-Stick mounted on my ASUS WL-500g).

logread gives me this:

root@OpenWrt:/# logread
Can't find circular buffer: Function not implemented

But thanks, anyway. Other possible solutions?


greetinx,
Harry

on my debian, sshd log to different files (authentication issues goes to /var/log/auth.log etc.) Not sure about the openwrt package.

However, I have sftp/scp service using  dropbear, don't need sshd.

However, I have sftp/scp service using  dropbear, don't need sshd.

OK, then how have you done it?

I removed all the openssh-packages and changed back to dropbear - ssh-shell-login works fine.
The SFTP- and SCP-program of the PuTTY-author both don't work.
Then I got WinSCP from http://winscp.sf.net/ . The SFTP-connection crashes again.

But in SCP-mode it works. In the beginning I got still errors, the ash said "command 'groups' not found". So I compared to my Debian, and then I wrote a shell-script in /usr/bin/groups with the following content:

#!/bin/sh
echo "root"

This "emulates" the behaviour of the real program "groups" (only for the user "root", I assume, but it's OK for me).

Now I can use WinSCP without problems.

Question: Does anyone have a better solution for my above mentioned shell-script?

Obsidian wrote:

However, I have sftp/scp service using  dropbear, don't need sshd.

OK, then how have you done it?

I removed all the openssh-packages and changed back to dropbear - ssh-shell-login works fine.
The SFTP- and SCP-program of the PuTTY-author both don't work.
Then I got WinSCP from http://winscp.sf.net/ . The SFTP-connection crashes again.

But in SCP-mode it works. In the beginning I got still errors, the ash said "command 'groups' not found". So I compared to my Debian, and then I wrote a shell-script in /usr/bin/groups with the following content:

#!/bin/sh
echo "root"

This "emulates" the behaviour of the real program "groups" (only for the user "root", I assume, but it's OK for me).

Now I can use WinSCP without problems.

Question: Does anyone have a better solution for my above mentioned shell-script?

Same problem here, winscp works with some errors only in scp mode. Obsidian, did you solve this?

Deselect "Lookup user groups" and "Try to get full timestamp" in the WinSCP Login dialog box (Advanced options; Environment -> SCP).

The discussion might have continued from here.