You are not logged in.

#1 2022-09-29 15:24:20

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

SSH connection refused to a live Arch installation

Port 22 is open in router.

Offline

#2 2022-09-29 15:30:30

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: SSH connection refused to a live Arch installation

It sounds like you haven't installed and/or enabled an ssh server?
https://wiki.archlinux.org/title/Ssh

Offline

#3 2022-09-29 15:33:00

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

Hello, Ferdinand.

No, it is a basic arch Linux live cd and ssh should be installed by default. One thing I noticed, is that Nmap says that port 22 is closed, but it's open in my router.

Offline

#4 2022-09-29 15:41:56

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: SSH connection refused to a live Arch installation

Hm.. maybe I misunderstand you?

Are you trying to ssh from some computer to another computer running Arch, or are you trying to ssh from Arch to the router?

In the first case it doesn't matter whether or not the router is listening on port 22, you need something listening on port 22 on the Arch machine - and in the latter case you only need an ssh client on Arch (which should be installed) and if the router refuses you it would be due to access restrictions configured on the router (but then nmap shouldn't report it as closed).

I think some more detail could help :-)

Offline

#5 2022-09-29 15:44:56

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

I'm trying to ssh from my Mac to my friend's pc to install Arch Linux. So my friend should install the OpenSSH package first?

Offline

#6 2022-09-29 15:46:44

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

On the booted iso run "systemctl status sshd" and post the output.
"closed" means there's nothing listening on that port on that IP - does the IP you test respond to ping's?

but it's open in my router.

Since you keep saying that: are you trying to access the server from a different network segment through a NAT'ing router?
If both systems are in the same segment, there's nothing to do in the router and if they're not, you need to actually forward that port to the desired lease.

Edit:

I'm trying to ssh from my Mac to my friend's pc to install Arch Linux.

1. your friend should install arch him/her/whateverself
2. Assuming you're operating across different segments: are you talking about your router or your friends router?

Last edited by seth (2022-09-29 15:49:26)

Offline

#7 2022-09-29 15:50:37

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: SSH connection refused to a live Arch installation

If you are using the standard Arch ISO you will also need to set a root password and restart the SSH server. Read...
https://wiki.archlinux.org/title/Instal … ux_via_SSH


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2022-09-29 17:45:43

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

seth wrote:

On the booted iso run "systemctl status sshd" and post the output.
"closed" means there's nothing listening on that port on that IP - does the IP you test respond to ping's?

but it's open in my router.

Since you keep saying that: are you trying to access the server from a different network segment through a NAT'ing router?
If both systems are in the same segment, there's nothing to do in the router and if they're not, you need to actually forward that port to the desired lease.

Edit:

I'm trying to ssh from my Mac to my friend's pc to install Arch Linux.

1. your friend should install arch him/her/whateverself
2. Assuming you're operating across different segments: are you talking about your router or your friends router?

1. He has almost no Linux knowledge and time so he wants me to install him arch Linux.
2. Port 22 is opened in his OpenWrt router.

Offline

#9 2022-09-29 17:47:11

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,730

Re: SSH connection refused to a live Arch installation

And you're going to maintain it for him as well? Install everything? Take all support issues?

Don't do it.

Offline

#10 2022-09-29 17:48:26

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

Slithery wrote:

If you are using the standard Arch ISO you will also need to set a root password and restart the SSH server. Read...
https://wiki.archlinux.org/title/Instal … ux_via_SSH

I did read this wiki page, the root password is set. Still "Connection refused". I suppose the issue might be in the Arch Linux default firewall, ex. all the ports in arch Linux iso are closed by default (?)

Offline

#11 2022-09-29 17:50:11

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

Scimmia wrote:

And you're going to maintain it for him as well? Install everything? Take all support issues?

Don't do it.

Yes, as I did.

Offline

#12 2022-09-29 19:33:26

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

seth wrote:

On the booted iso run "systemctl status sshd" and post the output.

666 wrote:

Port 22 is opened in his OpenWrt router.

seth wrote:

you need to actually forward that port to the desired lease.

I did read this wiki page, the root password is set.

The wiki wrote:

Confirm that PermitRootLogin yes is set in /etc/ssh/sshd_config. If it is not, set it and reload the OpenSSH daemon sshd.service to apply the changes.

I suppose the issue might be in the Arch Linux default firewall

seth wrote:

"closed" means there's nothing listening on that port on that IP

seth wrote:

you need to actually forward that port to the desired lease.

Offline

#13 2022-10-01 19:36:34

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

Port 22 is open:

https://ibb.co/kcLrzTp

systemctl status sshd:

https://ibb.co/XD44nw0

Permit root login is uncommented:

https://ibb.co/dPK4DKS

Offline

#14 2022-10-01 19:46:21

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: SSH connection refused to a live Arch installation

You've opened port 22 on the router, but is it forwarding to the correct dynamic address that your friends client is being assigned?
By the looks of it you're forwarding port 22 to an Android smartphone instead of the PC you are trying to connect to.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#15 2022-10-01 19:49:41

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

https://ibb.co/kcLrzTp says that 22 is forwarded to "this device" and "this device" is apparently some phone and not the IP/lease of the system that booted the arch iso ("ip a")?

Edit: fuck.

Last edited by seth (2022-10-01 19:50:09)

Offline

#16 2022-10-02 09:29:34

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 678

Re: SSH connection refused to a live Arch installation

"this device" is the router, that part is correct.
Edit the port forward and set "Internal IP address" to the IP address of the system booting the ISO and "Internal port" to 22.

Last edited by nl6720 (2022-10-02 09:31:18)

Offline

#17 2022-10-02 13:58:08

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

nl6720 wrote:

"this device" is the router, that part is correct.
Edit the port forward and set "Internal IP address" to the IP address of the system booting the ISO and "Internal port" to 22.

Did this, no success: https://ibb.co/NT1KJXh

Offline

#18 2022-10-02 14:23:52

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 678

Re: SSH connection refused to a live Arch installation

Source zone should be "wan" not "lan".

Offline

#19 2022-10-02 14:41:49

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

nl6720 wrote:

Source zone should be "wan" not "lan".

I know, I tried both.

Offline

#20 2022-10-02 17:13:22

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

If you know this, why do you post a screenshot with the nonsense setting???
Source zone WAN, destination LAN. Check nmap again.

Do you try this or your friend who "has almost no Linux knowledge and time" on the other end?
OpenWRT requires to apply the settings, if he just saves it it doesn't do anything and for a MAC user it's probably required to point out that merely changing the numbers does even less.

Offline

#21 2022-10-02 17:33:14

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

It is him trying it, he applied the correct settings.

Offline

#22 2022-10-02 17:42:03

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

Mac is only for my college work.

Offline

#23 2022-10-02 17:58:55

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

Updated nmap? Closed, filtered, open??

Offline

#24 2022-10-02 18:09:51

sa6ta6ni6c
Member
Registered: 2022-07-03
Posts: 15

Re: SSH connection refused to a live Arch installation

PORT     STATE    SERVICE
135/tcp  open     msrpc
139/tcp  filtered netbios-ssn
445/tcp  open     microsoft-ds
1433/tcp open     ms-sql-s
3389/tcp open     ms-wbt-server

Nmap done: 1 IP address (1 host up) scanned in 2.74 seconds

Offline

#25 2022-10-02 18:12:11

seth
Member
Registered: 2012-09-03
Posts: 64,282

Re: SSH connection refused to a live Arch installation

Are you supposed to have those ports open the WAN/forwarded by the router???

22 is still closed, nothing is listening on the other end.

Offline

Board footer

Powered by FluxBB