
The actual reason is that the author keeps trying and checking the log. Use xshell to prompt that the current key is registered in the server. 3, Frequently asked questions After ssh key login is configured, remote login cannot be performed If file based logging is required, set sshd_ SyslogFacility LOCAL0 in the config file, and the log file will be input into the% programdata%\ssh\logs file directory. It is best to test step by step, 2, Log viewīy default, the OpenSSH log is output to the system log, which can be viewed in the event viewer - Application and service logs. Prompt SSH user authentication, and the feedback is as follows:įor remote access, open the default access port 22 of the sshd corresponding to the firewall, and try whether the configuration is effective.
OPENSSH FOR WINDOWS PASSWORD
Switch to user name and password login, and prompt user name and password login, indicating that login has been disabled,

# but this is overridden so installations will only check.

Modify sshd_config, start certificate authentication, restart the service and test again #LoginGraceTime 2m The configuration is as follows:Ģ.4.3 disable user name and password login The local corresponding private key is introduced. The user name is consistent with the account name ggcyuser generated in the remote. Taking the standard user as an example, the private key is reserved locally for logging in and accessing the sshd service remotely. If the account is an administrative user, create a non suffix file administrators in the directory C:\Users\/.ssh /_ authorized_ In keys, If the account is a standard user, create a non suffix file authorized in the directory C:\Users\/.ssh /_ Keys, used to store the generated public key content pub as the public key and vice versa as the private key: >dirĢ.4.1 standard users and management usersįor standard users and management users, the corresponding public keys are stored in different locations on the server where sshd is located. The file directory is as follows, with *. SHA256:nr3jdbOpRaSZ2FOgqtOF68YMG5WvEuJEVF+jn7cbUqE name] Your public key has been saved in C:\Users\/.ssh/id_rsa.pub. Your identification has been saved in C:\Users\/.ssh/id_rsa. Generate public and private keys: >ssh-keygen -t rsaĮnter file in which to save the key (C:\Users\/.ssh/id_rsa):Įnter passphrase (empty for no passphrase): After confirming that the path is correct, there is no next step. Although this will be unsafe, it is recommended not to use an empty password in the production environment. The encryption algorithm is rsa and there is an encryption key.
OPENSSH FOR WINDOWS KEYGEN
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5Įxecute the SSH keygen command to generate the public key and private key according to the actual needs. The output results are as follows: > ssh -p -v Sometimes when remote access encounters problems, you can check the information by viewing the connection output log. To escape to local shell, press 'Ctrl+Alt+]'. The operations are as follows: > ssh -p to. When the port is the default 22, the port parameter configuration can be ignored. For relevant information, please see the official document: and Microsoft official documents: : the following configuration enables the ordinary user ggcyuser to access ssh remotely: # Example of overriding settings on a per-user basisĪfter adding, restart the sshd service. Last login two thousand and twenty-one/10/6 2:04:23Įdit% programdata% \ ssh \ sshd as Administrator_ Config, add AllowUsers configuration at the end of the file. The password can be changed two thousand and twenty-one/10/5 16:54:17 Password expiration two thousand and twenty-one/11/16 16:54:17

Last set password two thousand and twenty-one/10/5 16:54:17 With administrator privileges, execute cmd, execute user addition instructions, and create users as standard users, as follows: # net user username password /add

In general, for the sake of system access security, the system administrator account will not be directly used for remote access.
