gungunst
gungunst

Reputation: 379

How to Access SSH SERVER via GIT Bash

I'm having a problem trying to access another server using GIT Bash.

Do you know the command in GIT Bash?

I have tried but it always shows the error : bad number

Upvotes: 36

Views: 100976

Answers (2)

Brian
Brian

Reputation: 181

The command should be as follows if you are connecting to a remote server via SSH with a private key:

ssh <your-user-name>@<server-public-IP-address> -p <port-number> -i <your-local-ssh-private-key-name> 

I log into one of my servers with something like this, consider that my ssh key is under

/c/Users/brian or ~/

ssh [email protected] -p 2200 -i brianssh 

Upvotes: 18

Mihai238
Mihai238

Reputation: 1137

ssh user@server -p <port> works, at least for me.

Upvotes: 48

Related Questions