You are not logged in.

#1 2015-03-02 11:46:30

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Can't connect through SSH with PuTTy on windows computer

Hi, I am trying to connect to my Arch set up through a windows computer using Putty. I installed openssh with pacman and checked my inet address by using the

ip addr

command. I then copied that and put it in to putty that I installed on windows. I get "Network error: Connection refused", I pinged that same ip and got 4/4 packets. Not sure what to do, I tried searching for results online and got nothing. Any ideas?

Last edited by lolwtfidk (2015-03-04 06:51:44)

Offline

#2 2015-03-02 11:58:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: Can't connect through SSH with PuTTy on windows computer

Did you configure and enable the service?  Have you followed the wiki?

EDIT: also, I don't believe ip addr will give you the address you should be using, though this may dependend on the type of network setup you have.  I know my external IP I would use to ssh into my computer is not displayed in the `ip addr` output.

Last edited by Trilby (2015-03-02 12:00:36)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2015-03-03 00:38:51

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: Can't connect through SSH with PuTTy on windows computer

I pinged that same ip and got 4/4 packets

That indicates he's using the right IP address.  If both computers are on the same local network "ip addr" will usually give the correct address to use.

Look in your logs.  SSH should log any login attempts.

$ sudo journalctl -u sshd

You can also try SSH'ing into yourself.  From the host computer

ssh localhost

That will help determine if the problem lies with the network or with the sshd service.

Offline

#4 2015-03-03 02:01:05

cedeel
Member
From: ~
Registered: 2009-08-25
Posts: 176
Website

Re: Can't connect through SSH with PuTTy on windows computer

I'd say that Trilby is correct in assuming that the service isn't configured/started.

He said that he installed openssh through pacman and that's it. No need to to journal diagnostics before verifying the service is started in the first place.

Offline

#5 2015-03-03 12:46:41

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Re: Can't connect through SSH with PuTTy on windows computer

I tried configuring ssh with the wiki, but I don't think I did it right. It is not as clear as the installation is.

Offline

#6 2015-03-03 13:03:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: Can't connect through SSH with PuTTy on windows computer

What parts are you unclear on?  Can you describe the steps you've taken?  Is the daemon running (systemctl output can tell you this)?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2015-03-03 13:21:16

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Re: Can't connect through SSH with PuTTy on windows computer

Fixed it somehow by trying it over again.

Offline

#8 2015-03-04 06:51:19

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Re: Can't connect through SSH with PuTTy on windows computer

No wait, now its not working. Worked yesterday, but not this morning.

Offline

#9 2015-03-04 07:00:59

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: Can't connect through SSH with PuTTy on windows computer

It's quite possible that you've started the ssh daemon without enabling it. If you did, you would've been able to ssh in before rebooting. So, answer the questions people have asked you numerous times: did you enable the service? What steps did you take to do what you're trying to do?

Last edited by nullified (2015-03-04 07:06:53)


"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace

Offline

#10 2015-03-04 08:20:34

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Re: Can't connect through SSH with PuTTy on windows computer

nullified wrote:

It's quite possible that you've started the ssh daemon without enabling it. If you did, you would've been able to ssh in before rebooting. So, answer the questions people have asked you numerous times: did you enable the service? What steps did you take to do what you're trying to do?

sudo systemctl enable sshd.service

or

sudo systemctl start sshd.service

sometimes enable then start to see if that helps, but I don't want it running so I would normally just use start.

Then:

ssh local host.

Which I would get:

ssh: connect to host localhost port 22: Connection refused

Also I would try

 ssh -p 22 username@hostip

resulting in:

 ssh: connect to host *************** port 22: No route to host.

Last edited by lolwtfidk (2015-03-04 08:24:19)

Offline

#11 2015-03-04 10:10:05

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Can't connect through SSH with PuTTy on windows computer

What is the output of 

ssh -vvv user@host 

No need to add

-p 22

btw. as port 22 is the standard port for SSH.

Do you use a firewall?
Check the output of

sudo iptables -L

and see if you are allowed to connect
If not allow SSH..

 sudo iptables -A input -p tcp –dport SSH -j ACCEPT

Offline

#12 2015-03-06 12:11:31

lolwtfidk
Member
From: Japan
Registered: 2015-02-21
Posts: 33

Re: Can't connect through SSH with PuTTy on windows computer

1

debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ********* [*********] port 22.
debug1: connect to address ********* port 22: No route to host
ssh: connect to host ********* port 22: No route to host 

2

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

3

Bad argument `–dport'

Edit: Previously I was using ufw, but I just decided to switch and see which is better, sorry if it seems unconfigured.

Last edited by lolwtfidk (2015-03-06 12:12:34)

Offline

#13 2015-03-06 12:26:13

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Can't connect through SSH with PuTTy on windows computer

lolwtfidk wrote:

1

debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ********* [*********] port 22.
debug1: connect to address ********* port 22: No route to host
ssh: connect to host ********* port 22: No route to host 

2

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

3

Bad argument `–dport'

Edit: Previously I was using ufw, but I just decided to switch and see which is better, sorry if it seems unconfigured.

You can ping the SSHD machine, did you check with a nmap if port 22 on the server hosting SSHD is open?

`–dport' must be '--dport'

Offline

Board footer

Powered by FluxBB