- Edited
I recently used the command
Then I used putty (used the Connection -> SSH -> Tunnels option) to set up a "Dynamic" destination and a source port. I also changed my browser's proxy settings accordingly. Everything worked fine.
However I want to know if this command can be reverted/reversed ? I mean if I can set the system back to what it was before I issued the above command. Does it create a background process ? How can I stop SSH on my VPS from forwarding/listening at port 19002 ?
When I use
From what I gathered on the net about the -C2qTnN parameters:
-C Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP/IP connections)
-2 Forces ssh to try protocol version 2 only.
-q Quiet mode. Causes all warning and diagnostic messages to be suppressed.
-T Disable pseudo-tty allocation.
-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background.
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).
Thanks all.
on my VPS where user and host are respectively my username and VPS ip of course.ssh -C2qTnN -D 19002 user@host
Then I used putty (used the Connection -> SSH -> Tunnels option) to set up a "Dynamic" destination and a source port. I also changed my browser's proxy settings accordingly. Everything worked fine.
However I want to know if this command can be reverted/reversed ? I mean if I can set the system back to what it was before I issued the above command. Does it create a background process ? How can I stop SSH on my VPS from forwarding/listening at port 19002 ?
When I use
ps -ax | grep ssh
I see two results:
Killing any of them just closes/disconnects my remote SSH session so I'm guessing they have nothing to do with the tunnel ?24505 ? Ss 0:00 sshd: user[priv]
24509 ? S 0:00 sshd: user@pts/0
From what I gathered on the net about the -C2qTnN parameters:
-C Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP/IP connections)
-2 Forces ssh to try protocol version 2 only.
-q Quiet mode. Causes all warning and diagnostic messages to be suppressed.
-T Disable pseudo-tty allocation.
-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background.
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).
Thanks all.