Portál AbcLinuxu, 21. července 2025 16:39
cd /cesta/k/chroot/ mkdir dev cd dev mknod -m 666 null c 1 3
$ grep sftp /etc/ssh/sshd_config Subsystem sftp /usr/libexec/sftp-servers nejvetsi pravdepodobnosti za to muze
rssh
. nebo je nastaven ten nejaky rssh-shell/udelatko v /etc/shells
?
sftp only udelas pomoci 'ForceCommand
' a 'Match
' v sshd_config
, bohuzel s tim chrootem je to slozitejsi... Kdyby to bylo jednoduche vyresit zkutecne bezpecne a jednodusse, tak uz by to vyvojari OpenSSH/OpenBSD uz davno do OpenSSH dali :)
ja zacal se systrace
s sftp-server
- resp.
systrace -aU /usr/libexec/sftp-server(bohuzel s vicemene uspokojujicimi vysledky :), ale nemam na to cas... na linuxu systrace funguje, bud v gentoo nebo na vsech distrech pomoci ptrace (no reseni to neni optimalini). jine reseni by bylo nejaky RBAC - RSBAC? a politiku pro ten
/usr/libexec/sftp-server
vazanou na $USER
, ktery se prihlasi...
PS: pri sftp-serveru nefunguje scp pac se jedna jen to cat presmerovany pres ssh a to vyzaduje jako stdout shell.
Q: I support Windows users who can't/won't learn how to use SSH command-line tools. Can't you make rssh work with WinSCP?
A: Absolutely not. It's not because I think Windows is a crappy operating system that should never be used whenever alternatives exist (though that's basically true)... This ties in with the previous question. WinSCP is a bit of a hack (though a good one -- no offense meant to the author) which provides a GUI front end to command-line ssh tools. It requires that the user be able to run commands through ssh to manipulate the file system. There's already a way to do this... with sftp. In order to make rssh work with WinSCP, I'd have to modify rssh to be able to run a number of other commands. This is, IMO, the wrong approach.
Update: Recent versions of WinSCP allow you to use the SFTP protocol. If you use WinSCP with the SFTP protocol, it will work fine with rssh. See the WinSCP documentation for details of configuring it to use the SFTP protocol. If your version of WinSCP does not allow this, download a more recent version.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.