janmojzis / tinyssh

TinySSH is small server (less than 100000 words of code)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sshfs, tinyssh

lulcat opened this issue · comments

current arhclinux, gives me this on a sshfs attempt.. not sure if bug or just a lacking feature?

tinysshd: cVG3YoxN: BUG: (protocol error){channel.c:214}
Not sure about the activity of project but you are a great dev mate!!

I HOPE what seems as a slowdown of activity is simply because of a fairly complete package ,)

love from EUrope to .cz.
Ok, so that line indicates the channel pid is negative in channel_put.

Ignore error above; I didn't have sftp enabled in the tinysshd server. However, once I did, and can sftp in, I still get an error from tinyssh when trying sshfs:

tinysshd: eSIpVRao: BUG: (connection reset){packet_auth.c:57}

l57:
if (!packet_getall(b, SSH_MSG_USERAUTH_REQUEST)) bug();
SO some exchange issue, maybe I can browse some more tomorrow when I have more time. Although I don't recall if this is sshfs compatible (man sshfs saisi t used sftp which is why I realise the former mistake).

Well if that helps it works fine here on gentoo with:

  • OpenSSH 8.1_p1(-r3)
  • tinyssh 20190101, arguments: -l -s -p -x sftp=/usr/lib64/misc/sftp-server /etc/tinyssh/keys
  • tcpserver from ucspi-tcp
  • sshfs 2.10(-r1)

Yeah, some parts in there are pretty old, it's running amd64 stable.

No change with latest release of tinyssh.

Is development active?

Right lanodan, Thanks.. I haven't been on for a good while. I will have to return to it.. I think it was a lxc box or so, it's rare I go on an arch box so will have to revisit this some time. Thanks for your info though :)

Hello,
here is the fix https://github.com/janmojzis/tinyssh/tree/fixmaxpacket
which fixes the problem #54.
Can someone independently confirm, if the fix also fixes the sshfs problem?

@janmojzis I will be on my station later I think. Can check then if one else does. Cheers mate.

Well. I was testing on my own distro and it works. I did get some issues where possibly sshfs and not having a / at end didn't seem to find a folder. either that or it doesn't recognise hidden folders .. I don't know but it works. I don't have an arch lxc/vm right now. But I am sure I can get to test in the course of tomorrows. Great stuff! :) But ye, looks good.

You can close this. I seem to have been a total idiot and testing on the older binary, I can use sshfs even if I couldn't back then, at least on my distro. Again, the issue then was arch and I don't know if it was something I did or not, or if arch just has something which didn't work. OH. just checking on a arch vm, it won't work.. so this isn't a tinyssh bug, but arch it seems. So I am not gonna bother with this and I am very sorry for making it out it was possibly tinyssh. I mean, it could be just that on arch one has to set an extra permission or so.. which reminds me:

l# 52 (or used to be :p) in subprocess_auth.c
if (e == 0 && (st.st_mode & 022) != 0) { errno = EACCES; log_w4("auth: bad mode: ", d, "/", f); e = 1; }

This to me is fairly naĩve, I often have root:root 77* instead of 75* due to using /home for some group logs etc.
With tinyssh this won't work then and this part could do with a path with a bit more finesse. It was possibly during this I noticed the arch thing and was maybe overworked and never got around to properly checking where the bug was.

The log message, fixed in this commit: 5a2f6c5