New Droplet
button.Create Droplet
button. The creation of a Droplet might take a few minutes. As a result, you will see your server details as follows:ssh
command from your terminal:Settings > Apps
, select Manage optional features
.Add a feature
button.OpenSSH Client
, click Install
.ssh
command in your terminal.yes
. This will prompt you to enter a password. Note, all Linux systems don't reveal passwords when you type them, thus complete the process and click Enter. If your credentials are correct, you will see the following message:passwd
command. This will prompt you to type and repeat a new password. If everything is correct, you will see a success message:super user
rights to allow executing commands at root access without having all of the root access to modify system files. To create a new user, use the following command:$USER
with the name of the user you want to use instead of root. Then repeat a password for this user twice, and you can skip the other parts by pressing Enter:Make sure to have both root and your new user passwords saved before doing any of the steps below.
sshd_config
file using nano
or vi
text editors:#Authentication
section and change the PermitRootLogin
key from yes
to no
as follows:ctrl+o
(Linux/Windows) or control+o
(macOS) to save and Enter
to confirm the changes respectively. Then exit the file with ctrl+x
or control+x
.Permission denied, please try again
message.sshd_config
file by using the method from the previous step:# What ports, IPs and protocols we listen for
section and change the port number from 22
to any number higher than 100 or ideally 1000. Save the changes, restart the SSH, and logout from the server. If you try to access your server with default connections, you'll receive a Connection refused
error. You'll need to specify a port number each time you login into the server as follows:No such file or directory
, you don't have any SSH keys on your local computer. If you have a .shh
folder but you're not sure if you have any existing keys, use this command:cp
command:No such file or directory
, you don't have any SSH keys on your local computer. If you have a .shh
folder but you're not sure if you have any existing keys, follow this command:copy
command:Enter
for both of the options to have a default path and no passphrase accordingly. If you're concerned that your SSH keys can be hacked or compromised, you might consider setting a password. The entire process will look as follows:ssh-copy-id
command:ssh-copy-id
out of the box, so you need to install it first with brew
or other alternatives:ssh-copy-id
but you can use an alternative approach to achieve the same result. Run the following command from the Powershell as administrator:sshd_config
file on your server as follows:# Change to no to disable tunneled clear text passwords
section and change PasswordAuthentication
from yes
to no
as follows:AddressFamily inet
line.ufw
, firewalld
, etc.iptables-persistent
package. You can install it with the following command:Make sure to have two active SSH connections to your server (two terminals) before following the rest of the guide. This will help to change configs back without rebooting the server.
ctrl+o
(Linux/Windows) or control+o
(macOS) to save and Enter
to confirm the changes respectively. Then exit the file with ctrl+x
or control+x
.Note,$PORT
is a port you're using to connect to the server via SSH. The default value is 22 but if you follow this guide, it should be different by now. Seestep 5
for reference.
iptables-restore
is used to restore IP Tables from data specified on STDIN or in a file. The command should be used as follows:iptables-restore
:nmap
or netcat
tools as follows:apt-get
command as follows:sendmail
is an optional dependency used to send emails when new IP bans happen.
active (running)
. You can verify this with the following command:nano
or vi
text editor, paste the following values, and save the result:sshd
: