How to use ssh to connect to windows

What is the SSH protocol?

In the computer field, SSH text transfer protocol: secure file transfer protocol; is a data stream connection, a network transfer protocol that provides file access, transfer and management functions.

Use the ssh protocol on windows because the protocol passes through the tcp22 port, and unsafe programs such as routers, servers, switches, and sand sftp can use this port to help strengthen the connection to prevent eavesdropping. At present, the ssh protocol is tried in the Linux system, but the meaning of the SSH protocol itself is realized on various systems. Although the ssh protocol is not enabled by default in the windows operating system, it can be as simple as the Linux operating system after enabling the ssh protocol. It is convenient to use the ssh protocol to connect to the server. to operate.

The first method: If your system is Windows 10, you can install the built-in ssh client. (win+shortcut key appears windows settings, application management selection function, install oppenssh client)

The second is if your windows is an old system (lower than windows10) that does not have its own ssh client. You need to manually install ssh

1. You need to download the link on GitHub: https://gitcode.net/mirrors/PowerShell/win32-openssh

2. Unzip to the directory of the c disk, and cmd to the openSSH path

Execute the following command:

1) Install ssh service powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1

2) Develop port 22 netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22

3) Configure to start the self-starting sshd service: sc config sshd start= auto

4) Start the ssh service: net start sshd

Guess you like

Origin blog.csdn.net/weixin_50143243/article/details/129979302