Access Your Linux Instance From Windows - Some Other Ways [ GitBash, PowerShell]
- In the OS platform windows not having the Bash sheel .but others familier operating system like mac os, Ubuntu, Cent os, redhat Having Bash.
- So if we want to connect the Linux os remotely always we want to use putty or other third party ssh clients.
- Here i am going to show some easy ways to connect linux instances in windows other easy ways.
PowerShell
Install OpenSSH Client and Open SSH Server. To install client and server and initially configure the OpenSSH server, you can use the following command.
# Install the OpenSSH Client and Server
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Initial Configuration of SSH Server
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
# Confirm the Firewall rule is configured. It should be created automatically by setup.
Get-NetFirewallRule -Name *ssh*
# There should be a firewall rule named "OpenSSH-Server-In-TCP", which should be enabled
now you can connect your linux servers from windows PowerShell very easily
if you are using pem file for authentication.
Syntax: ssh -i (your key file path) (linux server user name)@(server ip or dns)
ssh -i "deep.pem" ubuntu@ec2-13-233-55-184.ap-south-1.compute.amazonaws.com
if you are using passwords for authentication.
Syntax: ssh (linux server user name)@(server ip or dns)
Git Bash
other option is Gitbash. we all already installed git. if you not have just install using following steps.
[Download here] (github-releases.githubusercontent.com/23216..)
install all with default optioins.
this is one main selection.
now Gitbash is open.its like shell.
if you are using pem file for authentication.
Syntax: ssh -i (your key file path) (linux server user name)@(server ip or dns)
ssh -i "deep.pem" ubuntu@ec2-13-233-55-184.ap-south-1.compute.amazonaws.com
Thats all guys. we are connect the linux pc using Windows inbuild powershell and gitbash.