SSH - The Right Setup

May 23, 2010

Now that you have the barebone Ubuntu server loaded on Linode, the next step is to set up a non-root user to manage it. Let's create a user called bruce:

Login into your box as root via the List console:

# adduser bruce --disabled-password
# usermod -aG sudo bruce

Let make sudo stop prompting for password:

# Type `visudo`
# Change
%sudo ALL=(ALL) ALL
# to
%sudo ALL=NOPASSWD: ALL

Next, we need to add our SSH public key to ~/.ssh/authorized_keys

We need to tell the sshd_config not to ask for password:

# in /etc/ssh/sshd_config
PasswordAuthentication no

Finally, restart your sshd with this command: /etc/init.d/ssh restart

More resources:

blog comments powered by Disqus

© 2011 Rit Li