Notes for SSH - various access methods and use for ssh
|
|
Set up a local proxy that would forward all traffic (encrypted) through the remote server - in this example from an internet cafe, one would connect to remote server, set the browser to use a socks proxy of "localhost:9999" and now all internet traffic is encrypted to/from the remote server.ssh -D 9999 user@remote .. or if you run your SSH on the server on a different port, say 4000 - ssh -D 9999 -p 4000 user@remote Set your Socks proxy to localhost:9999 - all webtraffic encrypted through the tunnel to the remote server. Add more tunnels for FTP, POP3 and with some proxy config will be secure. |
Tunneling: Local forwarding tunnel: set up a forwarding tunnel so when access localhost:1234 its forwarded to remote:23ssh -L 1234:localhost:23 user@remoteor if server uses port 4000 for ssh - ssh -L 1234:localhost:23 -p 4000 user@remote- here we are setting up secure telnet tunnel. Users access the remote server just by telnet to localhost:1234. |
ssh runs on port 22 & 4000 |
Tunneling: Remote forwarding Tunnel: set up a remote tunnel so when access remote:1234 its forwarded to localhost:23ssh -R 1234:localhost:23 user@remote- note the only difference is -L and -R. Here we are setting up secure telnet tunnel. Users on the remote server access the local server just by telnet to localhost:1234. |
X forwarding: Start X applications on remote server, send to localhost: ssh -X user@remoteor for different ssh port: ssh -X -p 4000 user@remoteThe -X to forward X - if that is enabled on the remote server in /etc/sdh/sshd_config: X11Forward yes |
| Firefox forwarding, multiple instances: Start X applications on remote server, send to localhost: On localhost: xhost +; then login with the -X optoin to the server, then firefox -no-remote will force firefox to start on the server and that instance will be forwarded to localhost. To run another instance - since only one profile can run at once, create a profile with firefox -no-remote -ProfileManager&.From Ubuntu forums and Lifehacker |