You are not logged in.
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
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
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
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
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
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
Fixed it somehow by trying it over again.
Offline
No wait, now its not working. Worked yesterday, but not this morning.
Offline
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
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
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
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
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