Advertisement
thesuhu

SSH Server (Windows)

Apr 30th, 2021 (edited)
1,625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # tested on Windows Server 2016
  2. # download OpenSSH (OpenSSH-Win64.zip). https://github.com/PowerShell/Win32-OpenSSH/releases
  3. # ekstrak ke C:\Program Files\OpenSSH-Win64
  4. # edit file sshd_config_default yang ada di direktori di atas, ubah bagian Port
  5. # buka Powershell dengan klik kanan pilih Run as administrator
  6. # Path system environment variable, ketik:
  7. setx PATH "$env:path;C:\Program Files\OpenSSH-Win64" -m
  8. # outputnya sebagai berikut
  9. SUCCESS: Specified value was saved.
  10. # pindah ke direktori OpenSSH, ketik:
  11. cd "C:\Program Files\OpenSSH-Win64"
  12. # install script, ketik:
  13. .\install-sshd.ps1
  14. # enable automatic startup and start sshd and ssh-agent, ketik:
  15. Set-Service sshd -StartupType Automatic; Set-Service ssh-agent -StartupType Automatic; Start-Service sshd; Start-Service ssh-agent
  16.  
  17. # tambahan, tambahkan port di inbound firewall jika diperlukan
  18. # If you are trying to change the SSH port in a Windows 10/Server 2016/2019 ,you can change the port in the below file
  19. %programdata%\ssh\sshd_config
  20. # kalo gak bisa eddit juga config di folder aplikasi
  21. # kemudian restart service sshd
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement