VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-use-ssh-to-connect-to-a-remote-server

โ‡ฑ How to Use SSH to Connect to a Remote Server (Step-by-Step Guide) | DigitalOcean


How to Use SSH to Connect to a Remote Server (Step-by-Step Guide)

Updated on June 1, 2026

By Anish Singh Walia

Sr Technical Content Strategist and Team Lead

English
๐Ÿ‘ How to Use SSH to Connect to a Remote Server (Step-by-Step Guide)

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author

๐Ÿ‘ Anish Singh Walia
Anish Singh Walia
Author
Sr Technical Content Strategist and Team Lead
See author profile

I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

The ssh-copy-id was not working on my Mac, so Iโ€™d like to share how I got it working.

  1. Install ssh-copy-id sudo curl https://raw.github.com/beautifulcode/ssh-copy-id-for-OSX/master/ssh-copy-id.sh -o /usr/local/bin/ssh-copy-id sudo chmod +x /usr/local/bin/ssh-copy-id

  2. Copy the public key: ssh-copy-id -i ~/.ssh/id_rsa.pub โ€˜-p <port number> <username>@<ip addressโ€™

  1. Copy the public key: ssh-copy-id -i ~/.ssh/id_rsa.pub โ€˜-p portnumber username@ipaddressโ€™ , where portnumber username and ipaddress needs to be filled in

Thank you very much, Mr. Justin. I can install whmsonic from ubuntu from your article.

I did exactly as instructed and it all seemed to work but it changed nothing in regards to having to type in a password. I still have to type one in. Did you miss stating the obvious, like that we still have to make config changes on the server or something?

@forgotmyorange: If you connect with <code>ssh -vv root@your.ip.address</code> it will add debugging output so that you can see what is happening behind the scenes. If it is actually connecting with the key, you should see something like:

<pre> debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/asb/.ssh/id_rsa debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-rsa blen 279 </pre>

my login isnโ€™t working for the consoleโ€ฆ any tips?

Hey thanks. Itโ€™s the clearest tutorial I found! and your blog looks nice.

I guess you forgot to mention you can disable password authentication after setting up SSH keys, as not to be exposed to brute force attacks.

  1. Is SSH server included in every Ubuntu desktop machine? how should we enable it? Maybe youโ€™ve written an article before, Iโ€™ll search for it.
  2. Does Ubuntu desktop provides a GUI interface in order to use -X option?

Hey thanks. Itโ€™s very helpful tutorial.

I have query regarding to see the server console for the running processes. So, can you please suggest me the command to see the running server console, so that i will be able to see the errors if occurs?

Hi, Thanks, extremely clear guidance. The local system is Cygwin on a WIndows 7 PC, The remote system is Ubuntu.

I still have a problem :


"we sent a publickey packet" - but there is no reply :

debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/jbww/.ssh/id_rsa (0x80061bd0),
debug2: key: /home/jbww/.ssh/id_dsa (0x0),
debug2: key: /home/jbww/.ssh/id_ecdsa (0x0),
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/jbww/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/jbww/.ssh/id_dsa
debug1: Trying private key: /home/jbww/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password

Does anyone have an idea as to what I can try ?

On cPanel based server you can connect it easily.

Follow this video: https://www.youtube.com/watch?v=9Yx1gZKgb5Y

๐Ÿ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOceanโ€™s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

ยฉ 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.