Created
May 15, 2014 09:04
-
-
Save od3n/5a43ac7abd7a7a2919f1 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
# login to your droplet | |
ssh root@<ip-address> | |
# change root password | |
passwd | |
# create new user | |
adduser -c "New User Description" -m <user> | |
# set new user password | |
passwd <user> | |
# set new user root priviligies | |
visudo | |
# look for root priviligies ( root ALL=(ALL) ALL) and write | |
<user> ALL=(ALL) ALL | |
# save and close | |
ESC + ZZ | |
# change ssh port | |
vi /etc/ssh/sshd_config | |
# Set the next parameters | |
Port <port-number> | |
Protocol 2 | |
PermitRootLogin no | |
UseDNS no | |
AllowUsers <user> | |
# save and close | |
ESC :qw | |
# reload ssh | |
/etc/init.d/sshd reload | |
# test your new ssh connection | |
ssh -p <port> <user>@<ip-addres> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment