❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

OpenSSH Server Day 14

22 February 2024 at 17:48

The Secure Shell Protocol (SSH) is a network protocol for operating network services securely over an unsecured network.

OpenSSH is the connectivity tool for remote login with the SSH protocol.


Installing openSSH in both client and server machines

apt install openssh-server openssh-client

To check status of openssh

systemctl status ssh


Remote login from local machine


Disabling Root Login

Make configuration changes in /etc/ssh/sshd config to disable root login.

set PermitRootLogin to no

restart ssh to apply changes

systemctl restart ssh

Modifying default port to 2222 from 22

Make configuration changes in /etc/ssh/sshd config to change default port to 2222.

Allow/Deny users or groups

Make configuration changes in /etc/ssh/sshd config


No Password login with public/private rsa key pair

Generate key to login without password

ssh-keygen

Sharing Public key to enable Password less login

id_rsa is the private key

id_rsa.pub is the public key

copy key to remote server
ssh-copy-id -i id_rsa.pub -p 2222 kaniyam@remote_server

verify public key in remote server


Execute command from local/client

commands like touch, mkdir, and rmdir could be executed form local.


SCP command

Secured copy let copying of files to and from server to local


OpenSSH Server Day 14

22 February 2024 at 17:48

The Secure Shell Protocol (SSH) is a network protocol for operating network services securely over an unsecured network.

OpenSSH is the connectivity tool for remote login with the SSH protocol.


Installing openSSH in both client and server machines

apt install openssh-server openssh-client

To check status of openssh

systemctl status ssh


Remote login from local machine


Disabling Root Login

Make configuration changes in /etc/ssh/sshd config to disable root login.

set PermitRootLogin to no

restart ssh to apply changes

systemctl restart ssh

Modifying default port to 2222 from 22

Make configuration changes in /etc/ssh/sshd config to change default port to 2222.

Allow/Deny users or groups

Make configuration changes in /etc/ssh/sshd config


No Password login with public/private rsa key pair

Generate key to login without password

ssh-keygen

Sharing Public key to enable Password less login

id_rsa is the private key

id_rsa.pub is the public key

copy key to remote server
ssh-copy-id -i id_rsa.pub -p 2222 kaniyam@remote_server

verify public key in remote server


Execute command from local/client

commands like touch, mkdir, and rmdir could be executed form local.


SCP command

Secured copy let copying of files to and from server to local


❌
❌