Skip to content

Instantly share code, notes, and snippets.

@StanislavNikolov
Created August 27, 2023 13:36
Show Gist options
  • Select an option

  • Save StanislavNikolov/361c79defd8c05c1b7fdde6cb87b713f to your computer and use it in GitHub Desktop.

Select an option

Save StanislavNikolov/361c79defd8c05c1b7fdde6cb87b713f to your computer and use it in GitHub Desktop.
echo "root:123" | chpasswd
apt install ssh
mkdir -p /var/run/sshd
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
echo "Starting sshd..."
/usr/sbin/sshd -D &
echo "Opening reverse tunnel to stjo.dev on port 7777"
ssh -R 7777:localhost:22 [email protected] -p 2222 -N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment