25 January 2015

SSH

After tinkering with the Raspi, I decided to try to learn a bit of  SSH, and though what I've learned is basic and limited to the LAN, it's enough for the moment.

One thing I've learned is that anything that can be done in terminal can be done with SSH, since it's accessing another machine with a runlevel 3 interface.

Last night, I decided to boot openSUSE 13.2 to runlevel 3 on Triela and try to SSH into her to run updates, but I had no such luck; I tried again with Lie-chan a couple hours ago and still had the same problem.

After poking around on the net, I found the problem. The first was that the firewall was blocking SSH (port 22), and the second was that the daemon wasn't running or set to run on boot.

Once I get the chance to (probably tonight when I update Melty), I'll be able to boot any machine to runlevel 3 and remotely update it and shut it down.

Oh, when I was tinkering with the Raspi, I sent a halt signal (sudo halt) which wasn't the best idea, since the terminal session hung - oops! I found out a couple hours ago with Triela that I should type sudo init 6 to reboot, and with Lie-chan I sent sudo init 0 with SSH to shut her down. Sending init 0 over SSH to the target machine does a proper shutdown which then sends a logout signal to the SSH client from the target machine, making it a much cleaner experience.

I tried to SSH into Taiga, but found that I was unable to since the dependencies for openssh-server were broken, so the server wasn't installed. I'll see if there's a way to fix it, though I think Debian PowerPC might make it problematic.


Things I've learned:
  • Check to make sure SSH daemon is running/scheduled to run on boot
  • Check to make sure firewall doesn't block incoming SSH signals
  • Use sudo init 0 to shut down machine instead of sudo halt
  • SSH is quite useful and I should have taken the time to learn it earlier

Raspi 3

I decided to tinker with the Raspi again, thinking of using it as a very low-powered FTP machine for transferring small files since the Raspi's ethernet is 10/100 and not gigabit.

Once it booted up, I got to some sort of weird display manager and had to grab the mouse to move the cursor so I could type in the login and password fields, but was unable to successfully log in for whatever reason. I was about to download Raspian, but then decided to look at the size of the ARM version of openSUSE. Since it was much smaller than Raspian, I tried openSUSE 13.2 first, but ended up with errors, so I went with 13.1 instead and got to the login without any problems.

I finished up setting up the FTP daemon before looking around on the internet a bit to learn how to SSH into the Raspi - to which I was successful. I then cleared out the SSH "known hosts" file and set up a static IP for the Raspi before playing with SSH a bit more.

What's nice is that I can just set up the Raspi with the bare minimum (power, ethernet, and usb drive) and then leave it alone - no need to login to it locally.

The only thing is that the Raspi is still a bit slow, even through SSH, but it's nowhere as bad as trying to run Chromium in Raspian.

I haven't set it up yet, since I'd have to rearrange the layout of the switch for the NAS and Melty, but I'll probably do it fairly soon.