MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Linux Tutorials: How to setup SSH keys on Ubuntu/ Linux

Introduction:
If you want to clone a repository from gitlab, github or bitbucket in your Ubuntu machine then you may need to setup SSH Keys in ubuntu and add that key to gitlab, github or bitbucket to make the repository accessible from Ubuntu machine.

Steps:
1. Login to the Ubuntu machine using SSH client like Putty
2. Run: sudo -s (This is to be a root user)
3. Run: cd /root/

4. Verify if .ssh file exists in the /root dir

Terminal ls -la output in /root with the .ssh directory highlighted

5. Generate SSH Key. Command: ssh-keygen

Terminal running ssh-keygen, pressing Enter at prompts to save id_rsa and id_rsa.pub in /root/.ssh

6. Move to /root/.ssh directory, Command: cd .ssh

7. Verify if the id_rsa.pub was created successfully using command: ls

Terminal: cd .ssh and ls listing files with id_rsa.pub highlighted

8. Reterive the public ssh key to add it in gitlab, github or butbucket using command more id_rsa.pub
You can simply copy the key and add them in gitlab, github or butbucket

Terminal running more id_rsa.pub to display the public SSH key for GitLab, GitHub or Bitbucket

9. Git clone to check if you are able to clone the directory after adding the key in gitlab, github or butbucket using commands:
exit
sudo git clone git@<Your_Repository_SSH_Clone_URL>

Thanks for reading, I hope you enjoyed the article.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
Say goodbye to the hassles of bike ownership! MotoShare.in offers affordable rentals, whether you need a scooter for errands, a bike for a road trip, or a reliable ride to explore new cities.

Related Posts

SSH Tutorials Complete Master Guide

List of Commands to Check, Add, Edit Firewall configuration of SSH in ubuntu Here is a comprehensive set of commands for managing SSH firewall configurations on Ubuntu,…

Read More

Access to aws EC2 instance using password in linux

rajeshkumar created the topic: Access to aws EC2 instance using password in linux Access to aws EC2 instance using password in linux Here’s what I did on…

Read More

Linux Tutorials: Enable SSH Password authentication in linux servers

To allow SSH logins with a password on a Linux server, set PasswordAuthentication yes for the OpenSSH server (sshd), make sure no drop-in file overrides it, give…

Read More

How to set Static IP Address in Ubuntu?

On current Ubuntu Server releases, you set a static IP address in a Netplan YAML file under /etc/netplan/, then apply it with sudo netplan apply. The example…

Read More

How to Install Ruby on Linux

You can install Ruby on Linux with your distribution's package manager (apt on Ubuntu and Debian, dnf on RHEL, Rocky, AlmaLinux and Fedora). If you need a…

Read More

Newrelic Tutorials: How to Integrate Apache2 in ubuntu

This tutorial shows how to monitor Apache HTTP Server (apache2) on Ubuntu with the New Relic Apache integration. It covers installing Apache, exposing the mod_status page that…

Read More