How to ssh from windows to my ubuntu machine in the local network
I know this is an old question, but it came up sorta high up in the Google search, so, for anyone having troubles for SSH'ing from a Windows to a Linux box, in my case, the problem was that I hadn't installed the SSH server on my Linux Mint machine.
Even if you do have SSH installed (like for connecting to another computers), you need this package to enable receiving connections.
sudo apt-get install openssh-server
Related videos on Youtube
Pleerock
Typescript/Javascript backend (node.js) and frontend (angular) developer. Previously PHP (symfony) & Java (android) developer. Over 10 years in software development. Checkout my open source repositories on github.
Updated on September 18, 2022Comments
-
Pleerock over 1 year
When I'm trying to ssh to my local ubuntu server from the gitbash on my windows machine Im getting this error:
$ ssh 192.168.1.11 ssh: connect to host 192.168.1.11 port 22: Bad file number
Other answers I've found seems to be related to linux-to-linux connetions. I'm newbie here, can you please provide information how to achieve that?
Running
nmap -sS 192.168.1.11 -p 22
:C:\Users\Me>nmap -sS 192.168.1.11 -p 22 Starting Nmap 6.40 ( http://nmap.org ) Nmap scan report for 192.168.1.11 Host is up (0.0040s latency). PORT STATE SERVICE 22/tcp filtered ssh MAC Address: 20:16:D8:3E:E0:30 (Liteon Technology) Nmap done: 1 IP address (1 host up) scanned in 13.70 seconds
Running:
ssh -v 192.168.1.11 -p 443
:$ ssh -v 192.168.1.11 -p 443 OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Reading configuration data /c/Users/Me/.ssh/config debug1: Applying options for 192.168.1.11 debug1: Connecting to 192.168.1.11 [192.168.1.11] port 443. debug1: connect to address 192.168.1.11 port 443: Attempt to connect timed out w ithout establishing a connection ssh: connect to host 192.168.1.11 port 443: Bad file number
And even if I edit my
.ssh/config
like this:Host ubuntu.dev Hostname 192.168.1.11 User meubuntu
And connecting to
ssh ubuntu.dev
It still does not work-
Stormvirux about 10 yearscould you update the question with output of
nmap -sS 192.168.1.11 -p 22
andnc -z 192.168.1.11 1-25 -v
or just scan port22
with any of the port scanners and update the question with the outout
-
-
Pleerock about 10 yearsIve already tried it, does not work. Turned off my antivirus and its firewall - still does not work. Maybe I need something to setup on my ubuntu machine?
-
aspdeepak about 8 yearsThis helped me in setting up ssh connection between my windows 7 host and ubuntu guest.