SSH Tunnel

1. You are using SSH key-based authentication

If the server already has your authorized_keys configured, then when you run:

ssh -D 1080 -C -q -N -p ( your ssh port )  yourusername@your_ip_ssh

โ€ฆand it doesnโ€™t ask for a password, it means the connection is successful because your SSH key is already recognized by the server.

To check if the tunnel is actually active:

netstat -tlnp | grep 1080

Or using ss:

ss -tlnp | grep 1080

You should see output like this:

tcp   LISTEN  0  128  127.0.0.1:1080  *:*  users:(("ssh",pid=xxxx,fd=3))

That means your SOCKS proxy is running on port 1080 โœ…


๐Ÿ”น 2. Youโ€™re running SSH without a login shell (because of the -N option)

The -N option means no remote command or shell session will be opened, so you wonโ€™t see any login prompt or output.
Thatโ€™s also normal โ€” the tunnel stays active in the background.

If you remove -q and -N, for example:

ssh -D 1080 -C -p (port) yourUsersername@your_ip_ssh_server

youโ€™ll enter the remote shell (youโ€™ll see the login prompt and normal SSH output).


๐Ÿ”น 3. Check if the tunnel is really working

Try setting your browser as follows:

  • SOCKS Host: 127.0.0.1
  • Port: 1080
  • SOCKS v5
  • Check โ€œProxy DNS through SOCKS v5โ€

Then open https://whatismyipaddress.com/
โ†’ If your IP changes to your SSH serverโ€™s IP, it means the tunnel is working properly. โœ…


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *