当前位置:网站首页>Windwos10 installing sshd service
Windwos10 installing sshd service
2022-06-29 13:16:00 【Know the old code】
Windwos10 install sshd service
install openssh Kit and ssh-copy-id
# install openssh and ssh-copy-id
choco install openssh ssh-copy-id -y
start-up sshd service
# Get into sshd Catalog
cd "C:\Program Files\OpenSSH-Win64"
# perform install-sshd.ps1 Script
.\install-sshd.ps1
# restart sshd service
Restart-Service sshd
# restart ssh-agent service
Restart-Service ssh-agent
# see ssh Service and ssh-agent Whether the service is running
Get-Service ssh
Get-Service ssh-agent
# see 22 Whether the port is listening
netstat -ano|grep 22
# telnet Test local 22 The port is open
telnet 127.0.0.1 22
To configure Win10 Of sshd service – Password free login
ssh The configuration file of is in C:\ProgramData\ssh\sshd_config
vim C:\ProgramData\ssh\sshd_config
# It's very important
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no #( You need to change the default yes Change it to no, Very important )
Annotate Document Last A few lines
#Match Group administrators
#AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
After modifying the configuration Make sure you reboot sshd service
Restart-Service sshd
Set up ssh Default after login shell
Set up shell by powershell
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
Set up shell by pwsh7
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force
Configure keyless login
# Generate key pair
ssh-keygen
# Load the private key into ssh-agent
ssh-add ~\.ssh\id_rsa
scp Upload the public key to ssh The server
# Upload private key to ssh The server
scp C:\Users\username\.ssh\id_rsa.pub [email protected]@contoso.com:C:\Users\username\.ssh\authorized_keys
ssh-copy-id Upload the public key to ssh The server
ssh-copy-id It didn't work , Report errors umask problem
ssh-copy-id [email protected]
ssh Sign in Windows-sshd The server
ssh [email protected]
边栏推荐
- C语言模拟实现所有字符函数
- Clickhouse database uses JDBC to store milliseconds and nanoseconds
- 神经网络各个部分的作用 & 彻底理解神经网络
- 如果我在深圳,到哪里开户比较好?另外想问,现在在线开户安全么?
- Tutorial on building pytoch model from zero (IV) compiling training process -- Parameter Analysis
- Beifu PLC controls servo through CANopen communication
- 【云驻共创】工业智慧“大脑”,老厂焕新的加速秘籍
- Aes-128-cbc-pkcs7padding encrypted PHP instance
- Qt的信号与槽
- Netdata mail alarm configuration
猜你喜欢

Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file

从零搭建Pytorch模型教程(五)编写训练过程--一些基本的配置

C语言内存函数

C#二叉树结构定义、添加节点值

Tutorial on building pytoch model from zero (IV) compiling training process -- Parameter Analysis

Don't build the wheel again. It is recommended to use Google guava open source tool class library. It is really powerful!

UI file introduction in QT

Matlab to find the limit

Precautions for Beifu controller connecting Panasonic EtherCAT servo

从零搭建Pytorch模型教程(四)编写训练过程--参数解析
随机推荐
CVPR 2022 | unknown target detection module study: learning unknown targets in video
leetcode 522. 最长特殊序列 II
asp.net 项目使用aspnet_compiler.exe发布
leetcode 903. DI 序列的有效排列
C # implements definition, insertion and construction of binary sort tree
Proteus Software beginner notes
Yunlong fire version aircraft battle (full version)
Pygame 精准检测图像碰撞
三维模型下载与动画控制
C binary tree structure definition and node value addition
倍福TwinCAT配置、调试第三方伺服详细讲解--以汇川IS620N为例子
SCHIEDERWERK電源維修SMPS12/50 PFC3800解析
编写一个shell脚本,求一个数的”逆序数“
Async principle implementation
C # output the middle order traversal through the clue binary tree
Golang image/png processing image rotation writing
C # realize the definition, stack entry and stack exit of stack structure
Record the process of a solid-state update and system migration debug
ZALSM_ EXCEL_ TO_ INTERNAL_ Solving the big problem of importing data from table
Install the terrain ovirt plug-in to provide automated management for ovirt