SSH, or "Secure Shell", is a networking protocol for securely connecting to a remote computer over an unsecure network. SSH is also the name of the default command-line SSH client. This tag is for questions involving using and troubleshooting SSH connections, as well as setting up and configuring SSH for applications which use the SSH protocol. This tag should be used with other tags to better identify the environment of the problem.
Ubuntu installs an SSH client (openssh-client) by default. If you want to be able to log in remotely into your machine, you need the server package (openssh-server). There are SSH clients for Windows as well, such as PuTTY.
Troubleshooting
If public key authentication doesn't work: make sure that on the server side, your home directory (~
), the ~/.ssh
directory, and the ~/.ssh/authorized_keys
file, are all writable only by their owner. In particular, none of them must be writable by the group (even if the user is alone in the group). chmod 755
or chmod 700
is ok, chmod 770
is not.
What to check when something is wrong:
- Run
ssh -vvv
to see a lot of debugging output. If you post a question asking why you can't connect with ssh, include this output (you may want to anonymize host and user names). - If you can, check the server logs, typically in
/var/log/daemon.log
or/var/log/auth.log
or similar. - If public key authentication isn't working, check the permissions again, especially the group bit (see above).