Last active
May 14, 2022 17:00
-
-
Save jurf/6f04ce4f9bfa2268bce154fb6ea0a69b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo dnf install --assumeyes openssh-server | |
sudo /usr/libexec/openssh/sshd-keygen rsa | |
sudo /usr/libexec/openssh/sshd-keygen ecdsa | |
sudo /usr/libexec/openssh/sshd-keygen ed25519 | |
echo " | |
# For VS Code | |
Port 22$VERSION # Prevent conflicts with other SSH servers | |
ListenAddress localhost # Don’t allow remote connections | |
PermitEmptyPasswords yes # Containers lack passwords by default | |
PermitUserEnvironment yes # Allow setting DISPLAY for remote connections" | sudo tee -a /etc/ssh/sshd_config | |
echo " | |
Host toolbox-$VERSION | |
HostName localhost | |
Port 22$VERSION" >> ~/.ssh/config | |
sudo /usr/sbin/sshd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment