6

I am trying to use my RPI without a keyboard (hasn't arrived yet). I have installed ArchLinux on the SD card and it's booting fine. Using OS X I am trying to connect to the RPI by connecting it directly to my laptop via ethernet (no router available).

The RPI appears on ifconfig at en0 with inet 169.254.233.8. Then, in Terminal I run

ssh alarmpi@169.254.233.8

and get

ssh: connect to host 169.254.233.8 port 22: Connection refused

although SSH is said to be enabled by default on arch Linux. Am I doing something wrong, or doesn't it just work this way?

  • How are the two devices connected? – Jivings Nov 8 '12 at 6:41
  • Directly via Ethernet. – Giannis Nov 8 '12 at 14:50
  • 1
    Is your macintosh on the same subnet as the raspberry pi? Is 169.254.233. the first 3 octates of your host IP? I am not sure if this will matter. – Lord Loh. Nov 8 '12 at 20:21
  • Can you ping the Pi OK? – Andrew Nov 9 '12 at 6:47
  • I believe there is something wrong with the connection. Im probably using wrong IP for RPI and most likely there is not IP for it.. I tried to ping the broadcast IP for the bridge0 found in ifconfig but only 1 IP is returned. Also en1 is empty. – Giannis Nov 9 '12 at 11:57
5

You could find the IP address using arp-scan or nmap's ping scan), but could also use the default /etc/hostname alarmpi in place of the IP address if DNS is working in your network.

If your DNS is not working, then do

nmap -T5 -sP 192.168.0.0-255 replacing the network id part of the address accordingly.

OR

arp-scan --localnet

to get a list of IP addresses using the IP address of the currently active network device: Results will be IPs that share the same network (subnet).

After that, read the Raspberry Pi Installation Guide at the bottom. e.g. https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3. It is only tricky in that it fails to mention that you cannot login as root on a headless Pi.

SSH Login

Root login is disabled by default so you need to use the default Arch Linux ARM user/password, see Where does the word "alarm" come from?:

Existing non-root username: alarm

Associated Password: alarm

Therefore, in your example you'd want to type ssh alarm@xxx.xxx.xxx.xxx or just ssh xxx.xxx.xxx.xxx. Fill in the xs with the IP address of your Raspberry Pi.

Once you are logged in, you can switch to the root user: login or as an su subprocess su -l root, in both cases the password is root.

3

Try to connect with "root", because I think "alarmpi" is not a valid user (it is the default host name). It is written on the Archlinux Raspberry's download page: "Default login Username: root Password: root"

  • I have still not managed to connect... Maybe I will wait for the keyboard and check if something else is wrong then. – Giannis Nov 9 '12 at 2:25
  • Are you sure you have to connect to the port 22, and not another one ? – Tiwenty Nov 9 '12 at 8:54
  • 2
    Since OpenSSH version 7, the default value of #PermitRootLogin in sshd_config has changed from "yes" to "prohibit-password". Thus, you cannot login as root with newer versions. openssh.com/txt/release-7.0 ... use alarm user and password alarm for first time boot – Marcus May 4 '17 at 11:36
  • Cannot be the answer. It is a connection problem, not login problem. The OP did not even connect to the SSH port. – Rbjz Apr 30 '18 at 12:24
2

This may not a solution for your this could be find a way out.

A. Ping your raspberry pi from OSX.

If it is reachable check the sshd is running or not (you can do a port scan).
If it is not reachable check the raspberry ip address, I have mentioned below.

B. check whether the user is granted for ssh or not.

if not add it.

C. Check the IP address of the two devices.

If your OSX have a class C ip then PI should be class C ip ie. 192.168.1.3 and should be in same subnet.

Probable solution

I think this address 169.254.233.8 may cause the problem.

  1. set your OSX ip address like 192.168.1.2
  2. change your raspberry ip to 192.168.1.3
  3. connect to pi using ssh alarmpi@192.168.1.3

I think this may helpful.

Thank you
Shantanu Banerjee

  • Given the problem stems from not having a keyboard on his Pi, and cannot connect over SSH, this may be a tad tricky :) – Andrew Nov 9 '12 at 6:46
0

As far as I know, SSH is not enabled by default. you need to enable it first

sudo mv /boot/boot_enable_ssh.rc /boot/boot.rc

without a keyboard, you can use Ubuntu live cd and boot from it. then put SD in and do the mv in Ubuntu

regarding IP, you can install BIND on your mac. this way Pi will get an IP. Private IP would not work.

0

It may have something about your ssh-key.

I have the same problem, even i format my sd card and "dd" my system again, i can't connect to my raspberry pi via ssh.

So i try to connect with out user name.

It tells me that "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!".

I cleaned my old host via "ssh-keygen -f "/home/XXXX/.ssh/known_hosts" -R X.X.X.X" It comes well after i do this.

May it can help you.

0

I had the same problem the default user in archlinux is not "alarmpi" nor "pi" but "root" with the password "root".

The ssh-server sshd is started automatically but the user "pi" is only used in raspbian.

  • Hey there, my answer conflicts with yours from my recent experience. Perhaps "root" over ssh has been disabled since Apr 21, 2015? – Jonathan Komar Feb 20 '17 at 11:27
  • Since OpenSSH version 7, the default value of #PermitRootLogin in sshd_config has changed from "yes" to "prohibit-password". Thus, you cannot login as root with newer versions. openssh.com/txt/release-7.0 ... use alarm user and password alarm for first time boot – Marcus May 4 '17 at 11:34
-1

I could not get this to work until I created a new use with sudo privlages

  • 1
    And how would the OP go about doing this? – Steve Robillard Feb 21 '16 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.