venket's b log

venket's b log

Access Your Linux Instance From Windows - Some Other Ways  [ GitBash, PowerShell]

Access Your Linux Instance From Windows - Some Other Ways [ GitBash, PowerShell]

Listen to this article
  • 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

image.png

image.png

image.png

image.png

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

image.png

image.png

image.png

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.

git-scm.com/downloads

[Download here] (github-releases.githubusercontent.com/23216..)

image.png

image.png

image.png

install all with default optioins.

this is one main selection.

image.png

image.png

image.png

now Gitbash is open.its like shell.

image.png

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

image.png

image.png

Thats all guys. we are connect the linux pc using Windows inbuild powershell and gitbash.

 
Share this