You are not logged in.
Hi there,
I'm thinking about shutting down the FTP on my homeserver and use SFTP instead. There is only one thing I couldn't solve so far: In my router I have QoS-rules that make FTP low priority traffic so my normal activities don't get affected by the file transfers. I would like to have the same setup for the SFTP. Now the problem is this: SFTP and SSH are both coming from the same ssh server, listening on port 22. So there is no way of distinguishing them on a ip/port basis. Is there any way of distinguishing SFTP and SSH? Like using iptables to tag one of them and then doing QoS based on the tag or something along those lines? I don't want to slow down my ssh-connections together with the sftp. If anyone has an idea how to accomplish this I would be really glad to hear about it.
Thanks in advance
seiichiro0185
Last edited by seiichiro0185 (2010-08-22 11:27:32)
My System: Dell XPS 13 | i7-7560U | 16GB RAM | 512GB SSD | FHD Screen | Arch Linux
My Workstation/Server: Supermicro X11SSZ-F | Xeon E3-1245 v6 | 64GB RAM | 1TB SSD Raid 1 + 6TB HDD ZFS Raid Z1 | Proxmox VE
My Stuff at Github: github
My Homepage: Seiichiros HP
Offline
sftp uses the same encrypted ssh connection as the shell to transfer the files. So from the outside it looks like you are typing A LOT. Just from the content, which is encrypted, my guess is, you cannot distinguish those two. Maybe you can look at the packet sizes and see if they differ from a normal session.
Offline
IIRC you can enable SFTP in proftd, and this would enable sftp over the regular FTP port.
This might work if your purpose is not to reduce the amount of services running.
I'd also look into rsync, it plays well over ssh.
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline
SFTP != scp. SFTP runs over port 115. You're talking about scp which uses SSH.
There's no way to do what you want -- interactive SSH and scp are both encrypted inside the same protocol. If the gateway could decrypt the traffic to QoS it then it would defeat the purpose of having it encrypted in the first place.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Well, a simple, though definitely not bulletproof solution: define multiple ports in sshd_config, then use one of them for sftp, and another for ssh?
Offline
IIRC you can enable SFTP in proftd, and this would enable sftp over the regular FTP port.
Did you mean FTPS ?
Offline
Well, a simple, though definitely not bulletproof solution: define multiple ports in sshd_config, then use one of them for sftp, and another for ssh?
Thanks for this hint, I didn't know that ssh could listen on multiple ports. Its not totally bulletproof, but good enough for my case. The only people who will have access to the server are trustworthy and won't fiddle with the settings to circumvent my restrictions.
Thanks to all of you for your suggestions.
My System: Dell XPS 13 | i7-7560U | 16GB RAM | 512GB SSD | FHD Screen | Arch Linux
My Workstation/Server: Supermicro X11SSZ-F | Xeon E3-1245 v6 | 64GB RAM | 1TB SSD Raid 1 + 6TB HDD ZFS Raid Z1 | Proxmox VE
My Stuff at Github: github
My Homepage: Seiichiros HP
Offline