×

Set Up SSH Keys on CentOS 7 - Step by Step Process ?

This article covers how to create a new SSH key pair and set up an SSH key-based authentication. You can set up same key to multiple remote hosts on CentOS system. Also, you will learn how to disable SSH password authentication.

SSH, or secure shell, is an encrypted protocol used to administer and communicate with servers. When working with a CentOS server, chances are, you will spend most of your time in a terminal session connected to your server through SSH.

SSH keys are typically configured in an authorized_keys file in . ssh subdirectory in the user's home directory. Typically a system administrator would first create a key using ssh-keygen and then install it as an authorized key on a server using the ssh-copy-id tool.

The public key should be stored in the ~/. ssh/authorized_keys file on the server.


To Create the RSA Key Pair:

1. Execute the command below to create a key pair on the client machine (usually your computer):

$ ssh-keygen

2. Press ENTER to save the key pair into the .ssh/ subdirectory in your home directory, or specify an alternate path.


Best Practices to improve SSH Key Security:

  • Discover all SSH Keys and Bring Under Active Management.
  • Ensure SSH Keys Are Associated With a Single Individual.
  • Enforce Minimal Levels of User Rights Through PoLP.
  • Stay Attentive to SSH Key Rotation.
  • Eliminate Hardcoded SSH Keys.
  • Audit All Privileged Session Activity.

Change Hostname on Ubuntu 18.04 - How to do it ?

This article covers how to change the hostname on Ubuntu 18.04 system using multiple methods. HostName is also referred to as the computer name of your system. It is used to identify the device in various forms of electronic communication in the computer network. Hostname helps you to access local web pages and other authorized data on your system.

The host name or computer name is usually at system startup in /etc/hostname file.


How to change the computer name on Ubuntu Linux ?

1. Type the following command to edit /etc/hostname using nano or vi text editor:

$ sudo nano /etc/hostname

Delete the old name and setup new name.

2. Next Edit the /etc/hosts file:

$ sudo nano /etc/hosts

Replace any occurrence of the existing computer name with your new one.

3. Reboot the system to changes take effect:

$ sudo reboot

Install Node.js and npm on Debian 9 - Step by Step Process ?

This article covers how to install nodejs and npm on your Debian system with different methods. Also, you will learn how to uninstall npm from your Debian system. Node.js is a JavaScript platform for general-purpose programming that allows users to build asynchronous network applications quickly. By leveraging JavaScript on both the front and backend, Node.js can make web application development more consistent and integrated.


To Install the Official Debian Node.js Package:

1. To get Node.js from the default Debian software repository, you can use the apt package manager. First, refresh your local package index:

$ sudo apt update

2. Then install the Node.js package, and npm the Node Package Manager:

$ sudo apt install nodejs npm

3. To verify that the install was successful, run the node command with the -v flag to get the version:

$ node -v


To Remove Node.js:

1. To remove either of these versions, type the following:

$ sudo apt remove nodejs

2. To uninstall a version of Node.js that you have enabled using nvm, first determine whether or not the version you would like to remove is the current active version:

$ nvm current

3. If the version you are targeting is not the current active version, you can run:

$ nvm uninstall node_version

This command will uninstall the selected version of Node.js.

4. If the version you would like to remove is the current active version, you must first deactivate nvm to enable your changes:

$ nvm deactivate

Different ways to Check Debian Version ?

This article covers how to check OS version using different methods. You can get more information on Debian releases at official site of the Debian Releases

The easiest way on how to check what Debian version you are running is to simply read a contents from /etc/issue file. Execute the command:

# cat /etc/issue

Also, you can check for /etc/os-release release file:

# cat /etc/os-release

Stop and Disable Firewalld on CentOS 7 - Step by Step Process ?

This article covers how to stop and disable FirewallD on your CentOS 7 system. Firewalld is a complete firewall solution that has been made available by default on all CentOS 7 servers. It is highly recommended that you have another firewall protecting your network or server before, or immediately after, disabling firewalld.


How to manage Firewalld ?

1. To disable firewalld, run the following command as root:

$ systemctl disable firewalld

2. To Stop Firewalld, execute the following command as root:

$ systemctl stop firewalld

3. To check the status of firewalld, run the following command as root:

$ systemctl status firewalld

Install Skype on Ubuntu 18.04 System - Step by Step Process ?

This article covers how to install Skype on your Ubuntu 18.04 desktop system. Basically, Skype is the most popular platform to connect people through their computer systems. You can freely connect to anyone all around the world through text, voice, and video calls. You can also choose to call people on their telephones but that will not be free. 


To Install the Skype snap:

1. Enter the following command in order to refresh the list of available packages:

$ sudo apt-get update

2. Since the Snap daemon comes by default in the latest versions of Ubuntu, we do not need to install it. If you are using an older version, you can use the following command:

$ sudo apt-get install snapd

3. Now type in the following command in order to install Skype Classic version:

$ sudo snap install skype --classic

Related Posts