Jump to content

How to connect via SSH on first boot ?


lucas24007

Recommended Posts

Hi everyone,

 

I'm using a Nanopi NEO2 as a NAS (link : https://www.friendlyarm.com/index.php?route=product/product&product_id=222) and it's provided with an armbian jessie version. I did try to upgrade to Stretch but I was missing some repositories. Now I'm trying to install a fresh Armbian Stretch version but on first boot SSH is not enabled.

 

How can I configure armbian ? I cannot connect keyboard/screen. Maybe there is another way to do it ? Other armbian/debian images ?

 

Does anyone have a solution ?

 

Link to comment
Share on other sites

2 hours ago, lucas24007 said:

Now I'm trying to install a fresh Armbian Stretch version but on first boot SSH is not enabled.


How long do you wait?

Link to comment
Share on other sites

7 minutes ago, lucas24007 said:

I've tried to connect about 3 minutes after booting.

I can't find on the doc if SSH is supposed to be enabled out of the box or not :/

 

on a normal armbian-image SSH and DHCP is enabled.

So you have to check which DHCP-IP-address do you get for the Neo2 and then it shoudnt take more than a minute (when using a Class 10 microSD-card) before you can login via SSH

User: root

initial Password: 1234 (you will be forced to change it to a new one - and create a additional new user)

 

(Done this many times here with my 3x NanoPi Neo2, 1x NanoPi Neo and 1x NanoPi Neo Core2)

Link to comment
Share on other sites

Really strange. I've found which IP is linked to the mac address of the NanoPi Neo2 (btw the network component vendor is : Chiun Mai Communication Systems, Inc).

It responds to my ping but when I'm trying to connect via ssh as root it says :

ssh: connect to host 192.168.0.21 port 22: Connection refused

 

It seems that DHCP is enabled but not SSH.

 

I've used the image : Armbian_5.83_Nanopineo2_Debian_stretch_next_4.19.38.img

 

The ethernet port's led is on (orange).

 

Thanks for your help !

 

Link to comment
Share on other sites

59 minutes ago, lucas24007 said:

Thanks for your help !

 

I would suggest you to check some those typical problems https://forum.armbian.com/forum/31-sd-card-and-psu-issues/
 

59 minutes ago, lucas24007 said:

I've used the image : Armbian_5.83_Nanopineo2_Debian_stretch_next_4.19.38.img


Working without any problems. This is boot log: http://ix.io/1I5W, actual setup

Spoiler

 

and SSHing to the board works which means the problem is on your side. A problem with a board? Not sufficient powering? Bad cables? Bad SD card?

 

If you are powering the board from computer, then another serial console will pup-up. You can login there and see why network is not up. If system gets that far ...

[62873.971897] usb 1-3.4.1: new high-speed USB device number 24 using xhci_hcd
[62874.072937] usb 1-3.4.1: New USB device found, idVendor=0525, idProduct=a4a7
[62874.072947] usb 1-3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[62874.072954] usb 1-3.4.1: Product: Gadget Serial v2.4
[62874.072960] usb 1-3.4.1: Manufacturer: Linux 4.19.38-sunxi64 with musb-hdrc
[62874.074956] cdc_acm 1-3.4.1:2.0: ttyACM0: USB ACM device
sudo screen /dev/ttyACM0 115200

 

Link to comment
Share on other sites

4 hours ago, abigailrose said:

I'm having this same issue with the same image. Nmap shows the ssh port (22) as closed


We need serial console logs to understand more.

Link to comment
Share on other sites

If SSH is not enabled out of the box, you can mount the image, and manually enable SSH before booting from it. You will have to symlink the systemd script in order to enable. You can also edit sshd_config.

Link to comment
Share on other sites

I can't connect via serial console either. I have a USB/TTL cable (tested the cable to make sure it works by shorting white to green, text appears on my screen as expected), using picocom in a OS X terminal window. Picocom opens and I can connect to the serial device, but nothing happens after terminal ready, even when I plug the cable in before boot, I don't see boot logs, and I can't type anything into the window. I've tried both armbian distros, multiple installations of them, nmap shows port 22 closed and ssh connection is refused.

Link to comment
Share on other sites

4 hours ago, abigailrose said:

I can't connect via serial console either. I have a USB/TTL cable (tested the cable to make sure it works by shorting white to green

I dont know which one of the green/white cable is RX and which is TX, but the have to cross-connect

RX -> TX

TX -> RX    and

GND -> GND

 

If your adapter does support it (via jumper setting), set it to 3.3V and your terminal program to 115.200 Baud

Neo2_NAS_TTL_serial_port.jpg

Neo2_TTL_serial_port_onboard_without_NAS.jpg

Link to comment
Share on other sites

19 hours ago, guidol said:

I dont know which one of the green/white cable is RX and which is TX, but the have to cross-connect

RX -> TX

TX -> RX    and

GND -> GND

 

I did this and now I get console output! But I'm still not sure of how to fix the ssh problem.

Link to comment
Share on other sites

22 minutes ago, abigailrose said:

I did this and now I get console output! But I'm still not sure of how to fix the ssh problem.

Since that you now been able to log into console using serial, check "ifconfig" to see network interfaces. Then try "nmtui" to enable interfaces.

Link to comment
Share on other sites

I had similar issue with Rock64 armbian buster trying to boot headless with USB WiFi

I did change the boot firstrun txt to enable WiFi and set ssid/pass but it would never connect to AP for SSH access

Unlike OP I had access to monitor, I found that the boot process stopped when asking to login root and change root password and create user

Using monitor/keyboard, after changing root pass and creating user, I had to run armbian-config to have the WiFi connect

After this it ran perfectly as headless and I was able to continue setup via SSH

 

Would not been a good day had I been like OP with no access to monitor / keyboard

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines