SSH is an acronym which stands for Secure Shell, which provides a secure shell access to a remote machine. This allow people to connect to a local and remote computer, and it comes readily installed in Linux/UNIX and it can be installed on Windows machine too.
SSH also refers to the suite of utilities that implement the protocol or cryptogr1aphic network protocol. We can install SSH on any Unix/Linux machine with the help of OpenSSH server.
No doubt, SSH always provides a strong authentication and encrypts all data between two systems but there are alot of methods through which we can easily crack the SSH password that we’ll be discuss in next article.
The first step is to install OpenSSH server in your Kali Linux machine by typing the following command.
Command: apt-get install openssh-server
Now to check the status of SSH service, you can check it by type “service ssh status” in your terminal.
And to start the ssh service in your Kali Linux machine, type “service ssh start“.
Now next step is to configure the SSH to run on persistently and for this we need to remove the run levels for SSH by typing the below commands:
Command: update-rc.d -f ssh remove
Command: update-rc.d -f ssh defaults
Next step is to take the backup of original SSH keys, you can skip this step but its important if you are re-configuring your OpenSSH package.
To take backup of SSH keys, just create a directory inside /etc/ssh and type below command.
Command: mv ssh_host_* backup/
Now for creating new keys, just type “dpkg-reconfigure openssh-server“.
By default the root login for Kali Linux in ssh is disabled and to enable the root login, just open /etc/ssh/sshd_config with any editor which you like and edit the file as per below screenshot.
By PermitRootLogin value to yes, will gives the root login enabled for SSH server. But for security reasons, always try to add a non-privileged user into ssh.
After configuring all above steps, just restart the service of SSH by typing “sudo service ssh restart” and also put ssh service on startup for every restart by typing “update-rc.d -f ssh enable 2 3 4 5“.
You can also change the MOTD banner (Message of the Day) by editing /etc/motd file and for creating such ASCII arts, you can use http://patorjk.com/software/taag/ website and don’t forget to restart the service at the end after changing the banner.
So when someone tries to login into SSH server with any ssh-client such as Putty or SecureCRT, the MOTD banner will show in the starting after successful authentication.
To make sure that secure shell starts after reboot use systemctl command to enable it:
Command: systemctl enable ssh
You may also like:- 15 Essential Windows Command Prompt Commands for Everyday Use
- Most Common DNS Record Types and Their Roles
- Top Skills Needed to Become a Cybersecurity Analyst
- Mastering Windows Management with WMIC Commands – Top 20 Examples
- Edit and Compile Code with the Best 5 Code Editors
- 50+ Top DevSecOps Tools You Need To Know
- Learn How to Add Proxy and Multiple Accounts in MoreLogin
- Some Useful PowerShell Cmdlets
- Create Free SSL Certificate – ZEROSSL.COM [2020 Tutorial]
- Generate Self-Signed SSL Certificate with OPENSSL in Kali Linux