3 ms·
Would you like to try cleartext SFTP, to compare performance? This can be done with inetd/socket activation. server# cat /etc/systemd/system/ctsftp.socket
by chasil 4y ago
Would you like to try cleartext SFTP, to compare performance? This can be done with inetd/socket activation.
server# cat /etc/systemd/system/ctsftp.socket
[Unit]
Description=cleartext sftp
[Socket]
ListenStream=7777
Accept=yes
[Install]
WantedBy=sockets.target
server# cat /etc/systemd/system/ctsftp@.service
[Unit]
Description=cleartext sftp
[Service]
ExecStart=-/usr/libexec/openssh/sftp-server
StandardInput=socket
User=nobody
Group=nobody
server# systemctl start ctsftp.socket
Then, on the client, set up a netcat.
client$ cat ncssh
#!/bin/sh
exec nc fileserver.myco.com 7777
client$ chmod 755 ncssh
Feel free to move around the cabin.
client$ sftp -S ./ncssh bogus
Connected to bogus.
sftp> put ncssh
Uploading ncssh to /ncssh
remote open("/ncssh"): Permission denied
sftp> cd tmp
sftp> put ncssh
Uploading ncssh to /tmp/ncssh
ncssh 100% 56 128.6KB/s 00:00
sftp> quit
I've also jacked this into stunnel. I haven't really benchmarked it, though.
You could probably chroot() this, if there was a desire to use it for something important.
For those who truly miss anonymous FTP, it was hiding inside of SSH the whole time. Shoehorning it back into the browsers is left as an exercise for the reader.
- ptman 4y agoYou can have anonymous sftp without it having to be cleartext https://news.ycombinator.com/item?id=26835989 https://news.ycombinator.com/item?id=26835989