How to add authentication to ssh dynamic port forwarding?
Posted
by
Aalex Gabi
on Server Fault
See other posts from Server Fault
or by Aalex Gabi
Published on 2012-10-14T00:32:53Z
Indexed on
2012/10/14
3:39 UTC
Read the original article
Hit count: 620
I am using ssh as a SOCKS server by running this command on the server:
ssh -f2qTnND *:1080 root@localhost
There is one problem: anybody can connect to the server and use it's internet connection.
Options:
- To use
iptablesto filter access to the server, but I connect to the server from various non-statically allocatedIPaddresses so I would have to edit very frequently those filters which can be annoying. - To install a
SOCKSserver on the remote. Ultimately this is the last option if there is no other simpler way to do it. (I am very lazy) - Launching the same command on clients machines. The problem here is that some clients don't run on
Linuxand it is awkward to set up the tunnel (Windows+Putty).
Is there a way to add authentication to a SOCKS server made using ssh?
Bonus question: How to add encryption between the client and the server (made using ssh)?
© Server Fault or respective owner