Skip to content

Instantly share code, notes, and snippets.

@fengli320
Last active December 21, 2022 06:34
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save fengli320/8679919e83833eb385c0fd1c6558ff8d to your computer and use it in GitHub Desktop.
Save fengli320/8679919e83833eb385c0fd1c6558ff8d to your computer and use it in GitHub Desktop.
How to setup SSHD in Git Bash
# Precondition: Git for Windows 2.9.0 + Windows 7, other version of Git for Windows & Windows XP and Windows 10 should also be supported
# In /etc/ssh/sshd_config, set UsePrivilegeSeparation to no
# You can also change other settings of SSHD like port in this file
# Generate key pairs
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -q -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -q -N ""
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -q -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -q -N ""
# Start SSHD
/usr/bin/sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment