ssh: connect to host 192.168.1.100 port 22: Connection refused fatal: Could

Download https://github.com/PowerShell/Win32-OpenSSH/releases
unzip into C: \ Program Files \ OpenSSH- Win64

Into the C: \ Program Files \ OpenSSH-Win64

Hold down the right mouse button to shift and run cmd

powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1


Set the service to start automatically and start the service:
sc config sshd = Auto Start
NET Start sshd

And then generates the configuration directory

Configuration file
C: \ ProgramData \ ssh
port number: Port 22
key access: PubkeyAuthentication yes
Password Access: PasswordAuthentication no
blank password: PermitEmptyPasswords no

C: \ Users \ account name \ .ssh directory, create authorized_keys public key file (also can modify the path in ssh_config)

Reference
http://www.cnblogs.com/chengchen/p/9610819.html
https://www.jianshu.com/p/6e5bc39d386e

https://www.cnblogs.com/ddif/p/10020454.html

 

Guess you like

Origin blog.csdn.net/github_38108899/article/details/92664880