Everything About SSH 🔒🗝️

What is SSH & Why We Use ?

How to Install SSH in Windows

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
cd .ssh
ssh-keygen -t ed25519 -C "youremail@gmail.com"
dir 
  1. id_ed25519 is your private key (Never Share it with Anyone)
  2. id_ed25519.pub (You can Share if you want to give access to others)
type id_ed25519.pub
Start-Service sshd
Set-Service -Name sshd -StartupType ‘Automatic’
if (!(Get-NetFirewallRule -Name “OpenSSH-Server-In-TCP” -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { Write-Output “Firewall Rule ‘OpenSSH-Server-In-TCP’ does not exist, creating it…” New-NetFirewallRule -Name ‘OpenSSH-Server-In-TCP’ -DisplayName ‘OpenSSH Server (sshd)’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 } else { Write-Output “Firewall rule ‘OpenSSH-Server-In-TCP’ has been created and exists.” }

How to Install SSH in Ubuntu/Linux

  1. Open the terminal application for Ubuntu desktop.
  2. For remote Ubuntu server you can use Ubuntu Terminal
  3. Type this Command
 sudo apt update && sudo apt upgrade
ssh-keygen -t ed25519 -C "youremail@gmail.com"
sudo chmod 700 .ssh
cd .ssh
sudo chmod 644 id_ed25519.pub
sudo chmod 600 id_ed25519
  1. Friend 1 (A)
  2. Friend 2 (B)
  1. Friend 1 Will Go to His .ssh folder
  2. Friend 1 Wil Copy the public key (id_ed25519.pub)
  3. Friend 1 will share the public key to Friend 2
  4. Now Friend 2 Will Open his .ssh folder
  5. create a file name authorized_keys
touch authorized_keys
nano authorized_keys
ssh suhail@192.168.0.239

How to Install SSH in Mobile Phone (Android)

apt install openssh
sudo apt update && sudo apt upgrade
ssh-keygen -t ed25519 -C "youremail@gmail.com"
sudo chmod 700 .ssh
cd .ssh
sudo chmod 644 id_ed25519.pub
sudo chmod 600 id_ed25519
  1. Friend 1 (A)
  2. Friend 2 (B)
  1. Friend 1 Will Go to His .ssh folder
  2. Friend 1 Wil Copy the public key (id_ed25519.pub)
  3. Friend 1 will share the public key to Friend 2
  4. Now Friend 2 Will Open his .ssh folder
  5. create a file name authorized_keys
touch authorized_keys
nano authorized_keys
ssh suhail@192.168.0.239

Congratulations🥳🎉Now You have Access of it

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store