Site icon Sistem Destek Uzmanı

OpenSSH Kullanarak Windows Üzerinde SFTP/SSH Sunucu Kurulumu

SFTP/SSH Sunucu Kurulumu

Windows 10 1803 ve üstü sürümlerde

  • Settings > Apps > Apps & features > Manage optional features.
  • “OpenSSH server” kısmına girin ve kurulumu başlatın.

Dosyalar%WINDIR%\System32\OpenSSH  klasörü içerisinde varsayılan olarak kurulu gelmekte. Konfigürasyon dosyası (sshd_config) ve ana bilgisayar anahtarları %ProgramData%\ssh klasörü içerisinde (sunucu ilk kez başlatıldıktan sonra).

OpenSSH yeni sürümü kurmak istiyorsan Windows 10 üzerinde mevcut kurulu olan yerine, aşağıdaki işlemleri yapabilirsiniz.

Daha Eski Sürüm Windowslar İçin

SSH Sunucu Konfigürasyonu

 

SSH ortak anahtar kimlik doğrulamasını ayarlayın

 

 

Connecting to the server

Finding Host Key

Before the first connection, find out fingerprint of the server’s host key by using ssh-keygen.exe for each file.

In Windows command-prompt, use:

for %f in (%ProgramData%\ssh\ssh_host_*_key) do @%WINDIR%\System32\OpenSSH\ssh-keygen.exe -l -f "%f"

Replace %WINDIR%\System32 with %ProgramFiles%, if appropriate.

In PowerShell, use:

Get-ChildItem $env:ProgramData\ssh\ssh_host_*_key | ForEach-Object { . $env:WINDIR\System32\OpenSSH\ssh-keygen.exe -l -f $_ }

Replace $env:WINDIR\System32 with $env:ProgramFiles, if appropriate.

You will get an output like this:

C:\Windows\System32\OpenSSH>for %f in (%ProgramData%\ssh\ssh_host_*_key) do @%WINDIR%\System32\OpenSSH\ssh-keygen.exe -l -f "%f"
1024 SHA256:K1kYcE7GHAqHLNPBaGVLOYBQif04VLOQN9kDbiLW/eE martin@example (DSA)
256 SHA256:7pFXY/Ad3itb6+fLlNwU3zc6X6o/ZmV3/mfyRnE46xg martin@example (ECDSA)
256 SHA256:KFi18tCRGsQmxMPioKvg0flaFI9aI/ebXfIDIOgIVGU martin@example (ED25519)
2048 SHA256:z6YYzqGiAb1FN55jOf/f4fqR1IJvpXlKxaZXRtP2mX8 martin@example (RSA)

Connecting

Start WinSCP. Login dialog will appear. On the dialog:

If you cannot authenticate to the server, and you are using Windows 10 Developer mode, make sure that your OpenSSH server does not conflict with an internal SSH server used by the Developer mode. You may need to turn off the SSH Server Broker and SSH Server Proxy Windows services. Or run your OpenSSH server on a different port than 22.

Exit mobile version