SSH connection refused when connecting remotly
Solution 1
If I am reading your question right, it sounds like you are using putty on windows, to connect to ubuntu. It also sounds like you are giving putty the IP 127.0.0.1
. If that is the case, you are telling putty to connect to your windows computer. To find the IP on ubuntu, you could run ip addr show
(on the ubuntu computer), then use the IP address for the interface you are using for internet (en0, wlan0, etc) with putty.
Solution 2
I just had to install SSH on the server: sudo apt-get install openssh-server
Hope this helps a fellow newbe running Win 8 with Ubuntu 13.04 as a guest OS in VMWare Player
Related videos on Youtube
michael
Updated on September 18, 2022Comments
-
michael over 1 year
I set up my Ubuntu server and it can connect to itself when running
ssh localhost
. However, when I run Putty on windows 8 I get a "connection refused" error. I have, to the best of my ability:- disabled the firewall
- double checked port number in putty
- allowed putty in my windows firewall (I can connect to other servers fine)
- reinstalled ssh
When trying to connect with putty I am using
127.0.0.1
and port 22 (I did not change the port number on my server from default). I think the problem is that the server isn't allowing external devices to connect to it still but if it isn't the firewall then I'm not quite sure where to look, I'm not the linux Guru I wish I was but I know enough to get by with most things.Additionally, I realize there have been many posts on this connection refused error, however I just spent all day reading through them and I couldn't find anything that looked relevant to the issues I am experiencing
-
dhojgaard almost 11 yearsFirst of all its a good idea to verbose the connection to get more details: ssh -v user@host
-
dhojgaard almost 11 yearscan you telnet to it? telnet <host-address> 22
-
michael almost 11 yearsokay i will try that right now and update this
-
michael almost 11 yearsokay so now when I attempt to ssh with my servers ip address (using putty on windows) I get "Network error: Connection timed out" and my internet is working on both systems
-
demure almost 11 years@michael Are your two machines are on the same router, or different networks? They way you wrote your question it is hard to tell which.
-
michael almost 11 yearsI used the above method to obtain my ip, before i was running sbin/ifconfig and I think I was typing in the ip for the wrong interface, anyhow, I just successfully signed on through putty, thanks!
-
V-SHY over 9 years+1 for help me solve my problems but actually I think you get downvote because this solution is not answer the OP question exactly.