Skip to content

Installing FSTP & SSH Windows

Sumber :

Petunjuk kali ini saya menggunakan Windows 11

Using Command Line

  1. Informasi instalasi Open SSH client dan server

    Syntax

    Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
    
    # Output belum terinstall
    # Name  : OpenSSH.Client~~~~0.0.1.0
    # State : NotPresent
    # Name  : OpenSSH.Server~~~~0.0.1.0
    # State : NotPresent
    
    # Output jika sudah terinstall
    # Name  : OpenSSH.Client~~~~0.0.1.0
    # State : Installed
    # Name  : OpenSSH.Server~~~~0.0.1.0
    # State : Installed
    
  2. Instal client dan server open ssh

    Syntax

    # Install the OpenSSH Client
    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
    
    # Install the OpenSSH Server
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    
  3. Memulai service SSH

    syntax

    # Start the sshd service
    Start-Service sshd
    
    # OPTIONAL but recommended:
    Set-Service -Name sshd -StartupType 'Automatic'
    
    # Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify
    if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) {
        Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
        New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
    } else {
        Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists."
    }
    
    # Untuk menguji apakah service sudah running 
    Get-Service sshd
    
  4. Mematikan service !!! info "Syntax"

    ```PowerShell
    Stop-Service sshd
    ```
    

Using GUI

  1. Untuk menginstall OpenSSH. Buka settings/system/Optional System.

    Picture

    foto

  2. Selanjutnya pilih view Optionals, lalu cari keyword OpenSSH, lalau tekan install.

    Picture

    foto 2

Installed folder dan konfigurasi

Binary data terinnstall di %WINDIR%\System32\OpenSSH. Sedangkan untuk konfigurasi file (sshd_config) dan hosts-keys terinstall di %ProgramData%\ssh

Setup chroot direktori

Buka %ProgramData%\ssh\sshd_config. Lalu uncomment dan berikan nilai sebagai berikut ChrootDirectory "D:\Demo\SFTP-Interface"