winssh is a Powershell script that installs and configures sshd service on Windows Server(2019 and later versions are supported). You can choose 3 different RunModes:
- default
Install sshd for access Windows Server using user and password for authentication.
- key
Install sshd, creates a new local user "ec2-user" without password, adds "ec2-user" as Local Administrator, disable password authentication for ssh and adds the AWS Key pair used in the creation of EC2 as trust key for ssh.
- full
key mode + powerash
Run this project as the Administrator user
iwr -o winssh.ps1 https://raw.githubusercontent.com/bgsilvait/winssh/master/winssh.ps1
.\winssh.ps1 -RunMode full
<powershell>
iwr -o winssh.ps1 https://raw.githubusercontent.com/bgsilvait/winssh/master/winssh.ps1
.\winssh.ps1 -RunMode full
&$PSHOME\profile.ps1
choco install vim curl awscli -y
&$PSHOME\profile.ps1
</powershell>
ssh -i key.pem ec2-user@ip
ssh administrator@ip