Skip to content

Instantly share code, notes, and snippets.

@fabiogomezdiaz
Created July 6, 2018 19:13
Show Gist options
  • Save fabiogomezdiaz/33f8d7fd7386227eae97705e0bdbb35d to your computer and use it in GitHub Desktop.
Save fabiogomezdiaz/33f8d7fd7386227eae97705e0bdbb35d to your computer and use it in GitHub Desktop.
Ubuntu: Enable ssh root login
#!/bin/bash
# Become root
sudo su
# Create root password
passwd
# Install java and ssh
apt-get update
apt-get install -y openssh-server
# Enable root ssh
sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config
systemctl restart ssh
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment