New install - SSH not accepting connections?

Ask questions about Arch Linux ARM. Please search before making a new topic.

New install - SSH not accepting connections?

Postby KnapsackExponent » Sun Jun 12, 2022 6:35 pm

New install on a Raspberry Pi 3 using the AArch64 image. I don't have a monitor hooked up to it but as far as I can tell the install was successful - it gets an address from DHCP and I can ping it. It doesn't seem to be accepting SSH connections however. I get an immediate "connection refused" from any SSH attempt. What gives?
KnapsackExponent
 
Posts: 2
Joined: Sun Jun 12, 2022 6:31 pm

Re: New install - SSH not accepting connections?

Postby ufo6000 » Mon Jun 13, 2022 10:44 am

Hello, please post the command + output of your ping test, and then the same with ssh. Also an "ssh -vvv ..." with more debug infos would be helpful.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: New install - SSH not accepting connections?

Postby KnapsackExponent » Mon Jun 13, 2022 7:44 pm

$this->bbcode_second_pass_quote('ufo6000', 'H')ello, please post the command + output of your ping test, and then the same with ssh. Also an "ssh -vvv ..." with more debug infos would be helpful.


$this->bbcode_second_pass_code('', 'root@hostname:~# ping 10.50.0.200
PING 10.50.0.200 (10.50.0.200) 56(84) bytes of data.
64 bytes from 10.50.0.200: icmp_seq=1 ttl=64 time=1.15 ms
64 bytes from 10.50.0.200: icmp_seq=2 ttl=64 time=0.551 ms
64 bytes from 10.50.0.200: icmp_seq=3 ttl=64 time=0.519 ms
^C
--- 10.50.0.200 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 17ms
rtt min/avg/max/mdev = 0.519/0.739/1.148/0.290 ms
root@hostname:~# ssh alarm@10.50.0.200
ssh: connect to host 10.50.0.200 port 22: Connection refused
root@hostname:~# ssh root@10.50.0.200
ssh: connect to host 10.50.0.200 port 22: Connection refused')

$this->bbcode_second_pass_code('', '
ssh -vvv 10.50.0.200
OpenSSH_9.0p1, OpenSSL 1.1.1o 3 May 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 10.50.0.200 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/me/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/me/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 10.50.0.200 [10.50.0.200] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 10.50.0.200 port 22: Connection refused
ssh: connect to host 10.50.0.200 port 22: Connection refused
')

$this->bbcode_second_pass_code('', '
nmap -Pn -sT -p 22 10.50.0.200
Starting Nmap 7.92 ( https://nmap.org ) at 2022-06-13 15:43 EDT
Nmap scan report for 10.50.0.200
Host is up (0.00086s latency).

PORT STATE SERVICE
22/tcp closed ssh
')
KnapsackExponent
 
Posts: 2
Joined: Sun Jun 12, 2022 6:31 pm

Re: New install - SSH not accepting connections?

Postby ufo6000 » Tue Jun 14, 2022 9:56 am

any local firewall enabled ?
special local ssh client config ?
test with telnet (use 10.50.0.200 of course):
$this->bbcode_second_pass_code('', '
$ telnet 192.168.178.52 22
Trying 192.168.178.52...
Connected to 192.168.178.52.
Escape character is '^]'.
SSH-2.0-OpenSSH_8.4p1 Debian-5
hello
Invalid SSH identification string.
Connection closed by foreign host.
')

if this is not getting us further: do you have any change to put a monitor on the pi, to debug ?
As alternative I suggest you try the normal ARMv7, not the AArch64 image.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: New install - SSH not accepting connections?

Postby swg » Tue Jun 28, 2022 8:41 pm

I had the same problem on a Raspberry Pi 4B: wanted to get going without hooking it to a keyboard and screen.

After inserting the sd card prepared with aarch64 every attempt to connect via ssh was refused. So I went over to my home office desk and just hooked it there to screen and keyboard (no ethernet there, so just for testing).

Long story short: On boot it got stuck when trying to mount the boot partition. /etc/fstab tells to look for /dev/mmcblk0p1, but it is /dev/mmcblk1p1. Change it and it will boot just fine, sshd will be available.

have fun
Stephan
swg
 
Posts: 1
Joined: Tue Jun 28, 2022 8:25 pm

Re: New install - SSH not accepting connections?

Postby ufo6000 » Wed Jun 29, 2022 4:28 pm

This is already known and part of the Raspberry Pi 4 installation guide,
https://archlinuxarm.org/platforms/armv ... berry-pi-4
but the OP has a Raspberry Pi 3 - so it is maybe a different issue.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: New install - SSH not accepting connections?

Postby holzboa » Wed Jun 29, 2022 4:43 pm

Probably ssh is disabled by default. Creating a empty file named ssh in /boot works in Raspberry Pi OS.
holzboa
 
Posts: 9
Joined: Tue Aug 03, 2021 1:04 pm

Re: New install - SSH not accepting connections?

Postby ufo6000 » Wed Jun 29, 2022 4:46 pm

no, the ARMv7 Installation and the AArch64 Installation have serial console and SSH enabled (which is also true for the Raspberry Pi 3), see the Raspberry Pi 4 installation guide,
https://archlinuxarm.org/platforms/armv ... berry-pi-4
Last edited by ufo6000 on Wed Jun 29, 2022 5:34 pm, edited 1 time in total.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: New install - SSH not accepting connections?

Postby holzboa » Wed Jun 29, 2022 5:24 pm

Yeah, just did a fresh install - ssh works as advertised here.
holzboa
 
Posts: 9
Joined: Tue Aug 03, 2021 1:04 pm

Re: New install - SSH not accepting connections?

Postby htking12 » Mon Aug 22, 2022 3:49 pm

ssh is probably turned off by default. In Raspberry Pi OS, creating a blank file with the name ssh in the boot directory will do the trick.
htking12
 
Posts: 1
Joined: Mon Aug 22, 2022 3:45 pm

Next

Return to User Questions

Who is online

Users browsing this forum: No registered users and 1 guest