0

I can't log in into ssh to crypt luks encrypted device with installed dropbear but I can while rpi is decrypted. I'm getting error: ssh: connect to host raspberry port 22: No route to host. While booting pi I'm getting error: ipconfig: eth0: SIOCGIFINDEX: No such device at boot. This device is Raspberry Pi with installed Raspbian 9 Stretch operating system. I'm following this guide https://stinkyparkia.wordpress.com/2014/10/14/remote-unlocking-luks-encrypted-lvm-using-dropbear-ssh-in-ubuntu-server-14-04-1-with-static-ipst/. I want configure remotely unlock crypt luks encrypted rpi device. I've set NO_START to 0 and copied ssh keys. The results from ifconfig -a command:

$ sudo ifconfig -a
enxb827eb1b2a72: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.5  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::83:5d01:52b3:b571  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:1b:2a:72  txqueuelen 1000  (Ethernet)
        RX packets 1141  bytes 115055 (112.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 843  bytes 132826 (129.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 102  bytes 7746 (7.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 102  bytes 7746 (7.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.1  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::1c84:9d97:1351:eec4  prefixlen 64  scopeid 0x20<link>
        ether ec:08:6b:0b:fa:a1  txqueuelen 1000  (Ethernet)
        RX packets 384  bytes 21449 (20.9 KiB)
        RX errors 0  dropped 135  overruns 0  frame 0
        TX packets 57  bytes 8368 (8.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Notice that 192.168.1.5 is my static ip address that I set in /etc/network/interfaces.

I added the static IP under the DEVICE= line in /etc/initramfs-tools/initramfs.conf:

IP=192.168.1.5::192.168.1.254:255.255.255.0::enxb827eb1b2a72:off

And bottom of file /usr/share/initramfs-tools/scripts/init-bottom/dropbear:

ifconfig enxb827eb1b2a72 0.0.0.0 down

But it nothing work.

The result of command sudo ip route show:

$ sudo ip route show
default via 192.168.1.254 dev enxb827eb1b2a72 src 192.168.1.5 metric 202 
default via 192.168.1.254 dev wlan0 src 192.168.1.1 metric 203 
192.168.1.0/24 dev enxb827eb1b2a72 proto kernel scope link src 192.168.1.5 metric 202 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.1 metric 203
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

1 Answers1

0

I solved it by adding net.ifnames=0 biosdevname=0 to /boot/cmdline.txt. Interfaces names were wrong.