DZone
Security Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Security Zone > SSH Tutorial: Nice and Easy [Video]

SSH Tutorial: Nice and Easy [Video]

Want a fun and engaging intro to SSH, SCP, and friends? Look no further than this video tutorial for a practical crash course on SSH.

Marco Behler user avatar by
Marco Behler
CORE ·
Jun. 20, 22 · Security Zone · Tutorial
Like (2)
Save
Tweet
3.29K Views

Join the DZone community and get the full member experience.

Join For Free

Ever looked for a practical crash course on SSH that is fun and entertaining at the same time? Then have a look at this brand-new episode of "Marco Codes: SSH Tutorial - Nice & Easy." In this video, you'll learn how to use:

  • SSH on the command line, which includes creating keypairs with various algorithms
  • SCP to copy/download files
  • SSH-agents to improve keyfile handling
  • SSH config files to properly manage your SSH target hosts
  • SSH keys to checkout repositories from GitHub 

You will also explore advanced topics like SSH agent forwarding, SSH tunneling, and using password managers for maximum comfort.  

By the end of the tutorial, there won't be many questions left when it comes to using SSH and friends.

What’s in the Video?

Even if you've been using SSH for a while, it makes sense to get a quick overview of how SSH and especially keyfiles work on a conceptual level. Therefore, we're going to start the video with a little hand-drawn diagram of how SSH is supposed to work.

Usually, you use SSH to connect from your local machine to servers. A popular point of contact is Amazon AWS to manage, for example, your EC2 hosts. That's why we'll start creating SSH keys through AWS UI, finding out what the differences are between the different encryption algorithms as well as what different formats (.pem and .ppk) are available. 

After having established your first successful SSH connection, we'll repeat the key creation exercise with SSH command-line tools like ssh-keygen, which are available on all major operating systems (Windows, Linux, MacOS). 

When you create your public/private keypairs through the command line, you'll have to copy your public keyfile onto the server, which we'll cover in the following authorized_keys file section.

Somewhat complementary to just opening up new SSH connections is the SCP tool. It lets you upload/download files and folders to/from servers via an SSH connection. We'll quickly cover how to use SCP.

Using SSH with password-encrypted keyfiles makes the most sense, as soon as you are using an SSH agent. SSH agents are again available on all major operating systems, though you'll have to jump through a couple of additional hoops on Windows to get everything up and running as expected. We'll cover all of the needed steps in the video.

Once you have SSH agents up, you can also play with SSH client config files to manage your SSH target hosts, give them nicknames, and even for more advanced scenarios like managing multiple SSH keys across multiple GitHub accounts with the help of aliases! This is a super helpful topic for anyone who's ever had to manage personal and work account SSH keys.

A video about SSH wouldn't be complete if it didn't cover advanced topics like SSH agent forwarding, as well as SSH tunnels. Agent forwarding allows remote computers to use your local keys without ever seeing them, whereas SSH tunnels allow you to connect to firewalled servers, for example, that are only available through the use of a jump host. 

Finally, if you want to squeeze some comfort out of SSH, you'll need to use it in combination with password managers, like 1Password or Keypass. They'll let you manage your SSH keys and even provide their own SSH agents, which is so useful that we're going to finish off the video with this.

Check it out and let us know what you think!  


GitHub Secure copy protocol Algorithm Command (computing) Crash (computing) Host (Unix)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • SQL CTE: How to Master It in One Sitting With Easy Examples
  • How To Use Open Source Cadence for Polling
  • Legacy Modernization and Hybrid Cloud with Kafka in Healthcare
  • How to Build a Simple CLI With Oclif

Comments

Security Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo