Skip to content

Instantly share code, notes, and snippets.

@mamemomonga
Last active January 21, 2022 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamemomonga/c3b047f3147411320a17cc550fb11300 to your computer and use it in GitHub Desktop.
Save mamemomonga/c3b047f3147411320a17cc550fb11300 to your computer and use it in GitHub Desktop.
WSL2のUbuntuの中でOpenSSHDを起動する方法

WSL2のUbuntuの中でOpenSSHDを起動する方法

1. ubuntuの中にsshdを入れる

$ sudo apt install openssh-server

2. 以下を内容を wsl-sshd-start.cmd という名前で作成する

※ CRLFで保存すること

@ECHO OFF
echo *********************
echo *** STARTING SSHD ***
echo *********************
bash -c 'sudo /etc/init.d/ssh start'
pause

3. wsl-sshd-start.cmd をダブルクリック

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment