Windows environment configuration ssh tunnel

ssh tunnel is a very useful tool. It can create a socks5 locally, and then go through the ssh channel. It is very easy to configure and use in the linux environment.

Recently started to use windows office, but also to deploy this tool, searched a circle of tutorials, mentioned that you need to use putty or plink.exe, or even ccproxy, it seems very troublesome, actually tested it, and found that it is as simple as the linux environment , without installing additional software, the method is as follows

  1. Windows 10 and above all come with openssh, and you can confirm it by typing ssh directly in the command line, no need to install additional software

  2. Create .ssh a folder in the user directory, copy the key, pub, and config files under linux, and I usually define the config file like this

Host vps
    HostName 远程服务器的ip 
    User root
    IdentityFile ~/.ssh/id_rsa

ssh vpsIn this way, you can log in to the remote server by directly entering the command line , which is very convenient

3. Create a bat file with the following contents

ssh vps -C -N -D 8080

When you need to open the tunnel, just double-click the bat. This line of command is exactly the same as the one below linux/mac. In the linux/mac environment, I usually add an alias. When needed, enter a command in the term.

In addition, it is recommended to use firefox as a browser, because its app store can be directly accessed and plug-ins can be installed directly. If you use chrome, there is still a question of Mr. Chicken or Mr. Egg

This article is reproduced from Chen Sheng's blog

Guess you like

Origin blog.csdn.net/victorc666/article/details/125073151