SSH Command: Junior to Senior Web Dev Roadmap
Tags: webdev, beginners, programming, tutorial
Published: 2023-10-19 17:31:40

Are you someone who is a junior developer struggling to climb up the corporate ladder and become a senior developer?

Are you a full-stack developer who feels lost and doesn't know where to start? 🤔

Well, you are in the right place! 😎

### Why learn SSH?

- SSH plays an important role in secure remote communication. By familiarizing yourself with SSH basics, its commands, encryption methods, SSH key management, and applying SSH for real-world applications, you're well on your way to becoming a Senior Developer.
- Check out my previous blog [SSH 101](https://dev.to/aswin2001barath/ssh-101-junior-to-senior-web-dev-roadmap-2l31) to learn more about What is SSH, Commonly known protocols, SSH in comparison with HTTPS and SSL, Significance of SSH.
- In this blog, I'll break down the SSH Command in detail and share 3 real-world use cases where SSH applies in Web Development.

### SSH in practice

![SSH in Practice Shell Snapshot Source Hostinger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9nqrrapuxo1qodgc87n.JPG)

- The example above shows a typical SSH prompt. Any Linux or macOS user can SSH into their remote server directly from the terminal window.
- Windows users can take advantage of [SSH clients like Putty](https://www.hostinger.com/tutorials/how-to-use-putty-ssh).
- You can execute shell commands in the same manner as you would if you were physically operating the remote computer.
- Source: https://www.hostinger.com/tutorials/ssh-tutorial-how-does-ssh-work

### SSH Command

```
ssh {user} @ {host}
```

- In Simple Terms: To use SSH, you can just run the above SSH command with the _{user}_ we want to reach the _{host}_, that is the computer's IP address we want to connect with remotely.
- Using SSH, we can connect to any computer that allows for these SSH connections anywhere in the world.

#### SSH Command Breakdown

- For example, consider this SSH command we observed in the above SSH prompt Screenshot.

```
ssh root @ 192.168.29.91
```

1. The **SSH** key command instructs your system that you want to open an encrypted secure shell connection.
2. **user** represents the account you want to access. For example: the **root** user, is synonymous with system administrators which provides complete rights to modify anything on the system. (which can be dangerous at times)
3. **host** refers to the computer you want to access. This can be an IP address (like the above example) or a domain name.

- Once you hit enter, you can either use (1) Password Authentication or (2) Set up SSH keys, then you'll be greeted with a remote terminal window similar to the above SSH prompt screenshot.

### 3 Real-World Use Cases

- SSH is a very important concept that not many talk about.
- But as a Web Developer, you really need to understand because you will use SSH all the time in your career.
- The following are 3 Real-World Use Cases of SSH in Web Development:

1. Connect with GitHub
   - Connecting to GitHub is important for us to clone, push, and pull Repository files from their servers to your computer.
   - When we clone any GitHub Repository from GitHub, we have two options: Use (1) HTTPS and (2) SSH.
   - Using the HTTPS method you have to enter your GitHub username and password every time.
   - Although, using the SSH method, once you create a personal access token for your computer and set up SSH keys, you don't need to enter your username and password every time.
   - Hence, using SSH saves a lot of time when working with GitHub.
2. Remotely access another computer
   - For example: let's say you're working from home (WFH) and you need to access your computer at work, you can just SSH into it.
   - This provides a secure channel with your work computer.
3. Connect with production server
   - For example: let's say your product or web app gets deleted by mistake from the production server. In such a scenario, all you have to do is the following:
   - SSH into the production server with your computer,
   - Clone the project files to the server again,
   - Go through the production and deployment steps like _npm intall_, _npm build_, _npm start_ and so on (Assuming it's a Node JS app) and get the app, up and running again.

### What next?

Learn more about the following topics with the help of the resources provided at the end of this blog to solidify your knowledge in _SSH_

- **Encryption**: To truly grasp SSH, it's important to understand key concepts such as encryption, which involves both symmetric and asymmetric encryption techniques, as well as hashing. These concepts lay the foundation for a deeper understanding of SSH's security mechanisms.

- **SSH Keys**: An integral part of SSH is the use of SSH keys. These keys consist of a public key and a private key. Learning how to generate, manage, and securely store these keys on the server is crucial for effective SSH usage.

- Practice and Test your SSH skills:
  - A great way to practice your SSH skills is by connecting your local computer to platforms like **GitHub** or cloud providers such as [**DigitalOcean**](https://m.do.co/c/201036484da7). This hands-on experience will help solidify your understanding of SSH concepts.
  - Imagine this scenario: "Your web application mysteriously disappears from the server overnight. Your task is to restore all project files onto the server using SSH." Successfully completing this task showcases your SSH skills and your problem-solving abilities. Basically, if you can do this, you're awesome!

### Best Resources

Learn more about _SSH_ with the help of the following short and concise resources:

- Learn about [how SSH works](https://www.hostinger.com/tutorials/ssh-tutorial-how-does-ssh-work), and [how to SSH into a server](https://www.digitalocean.com/community/tutorials/understanding-the-ssh-encryption-and-connection-process).
- Learn a little about [Symmetric and Asymmetric encryption](https://www.youtube.com/watch?v=GSIDS_lvRv4) as well as [Hashing](https://www.youtube.com/watch?v=b4b8ktEV4Bg)
- Learn how to [manage SSH keys](https://www.youtube.com/watch?v=DbPDraCYju8)

Learn more about the _Junior to Senior Web Development Roadmap_ with the help of the comprehensive resources:

- [Junior to Senior Web Developer Roadmap Blog Series](https://dev.to/aswin2001barath/series/24357): A Blog series where I will be learning and sharing my knowledge on each of the above topics.
- [Don’t be a Junior Developer: The Roadmap From Junior to Senior](https://academy.zerotomastery.io/a/aff_5s8ff6y7/external?affcode=441520_dcwk-s8s): A detailed roadmap blog by Andrei Neagoie (a Senior Developer) with links to free resources.
- **Zero To Mastery Course**: [The Complete Junior to Senior Web Developer Roadmap Course](https://academy.zerotomastery.io/a/aff_hpwn5xy9/external?affcode=441520_dcwk-s8s): A comprehensive course by Andrei Neagoie (the same Senior Developer) that covers all of the above topics.

### **Who Am I?**

- I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through [Blogging](https://medium.com/techsoftware) during the busy time of my freelancing work life.
- I'm also a Junior Developer like you learning how to become a Senior Developer and sharing my knowledge along the way.
- Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath

**Thank you** so much for reading my blog🙂.