Now you can use ssh 192.168.1.50 and it shouldn’t prompt you for a password. Use ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.50 to copy your public key to the RPi, you will need to log in with your RPi credentials, then logoff. Run ssh-keygen on your linux server (assuming you haven’t run that previously) and press enter when it asks for a passphrase. As I’ll be putting this up online, I want to use a different port other than port 22, so you can edit your /etc/ssh/sshd_config file and add another line to say Port xyz and just open this port on your router. Firstly either change your Pi password to something else than the default and/or create a different username. Normally when you use rsync over SSH to connect, it prompts you for your password but as I’d like this to be setup as a scheduled task, we’ll need it to automatically authenticate us. If it wasn’t facing the router, at startup it didn’t connect to the wireless for me and you may experience some packet loss so a bit of testing/moving around is required for these adapters that don’t have a large antenna. When the RPi was in the same room as the router I got 2-3MB/s performance, when it was 2 rooms away it jumps around a little around 500 – 800KB/s sometimes and but usually stays around 1.4 – 1.8MB/s though this is only when the USB adapter was facing the router. Reboot the RPi and you should be good to go, you can run iwconfig to see that it’s connected. We modify the file by using sudo nano /etc/wpa_supplicant/wpa_nf and make sure it matches the configuration above and changing the SSID and PSK password to suit your needs. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev In brief, we run sudo nano /etc/network/interfaces and in the wlan0 section we add in “wpa-roam /etc/wpa_supplicant/wpa_nf”. The wireless setup is straight forward using this guide, the RPi was able to detect my Wifi adapter automatically. Using webmin we can choose to mount this file system on boot to /mnt/usbhdd (I created this mount point by running sudo mkdir /mnt/usbhdd). Next we make the filesystem on the primary partition we just created, I chose going with EXT3 and we run sudo mkfs -t ext3 /dev/sda1 which takes a few minutes to run. We list the disks by running sudo fdisk -l to list our disks and then run sudo fdisk /dev/sda to setup our primary partition. I like to firstly install Webmin ( sudo apt-get install webmin) to make things easier to manage later on. Once it’s all powered up, we connect via the LAN cable so we can setup the hard drive and the wireless later. Now were’ ready for the software side of things. I may need to add some vent holes around the case to keep things a bit cooler. The case measures 136mm x 82mm x 41mm and weighs 265g – it could possibly be reduced by 10-20mm on each side but I made it a little bigger just to be sure everything would fit. There’s 3 layers to this case and it all fits together pretty snug, maybe a little too tight between the bottom 2 layers, I’ve now added the USB Wifi adapter. I’ve glued down the DC jack, added a small slot cutout near the USB so that the SATA adapter’s cables will slide in there and have screwed in the Pi and hard drive to the acrylic panels. Now that I have the hard drive base for the acrylic case, we can start putting it all together. Just using a spare 500GB hard drive whilst testing. As a side effect, this SATA adapter has quite a bright blue LED which illuminates through the acrylic case which gives it some colour. I went ahead, opened it up, shortened the USB cables, separated the power cable out (as I don’t want the Pi itself to power it), re-soldered the wires to a USB connector I had – it’s now more compact. The SATA to USB adapter that I bought from Ebay was larger than I wanted so it’s time to make it smaller. In terms for the power supply, I’m able to re-use an existing 5V 2A supply but otherwise I could have used my SMPS. The Raspberry Pi was purchased from Element14 / Newark and this time it has mounting holes which will make things more easier for us. I’ve decided that I’ll use it for remote backups in which I’ll use rsync over SSH from my linux server to backup some of my data at night.ĭue to my use case, I’ll need to have it operating 24×7 and don’t really have a need for an LCD or even power button, so it will be a minimalistic design. Ever since I built my 4 bay 3.5″ NAS using the Raspberry Pi which was placed inside a Netgear NV NAS enclosure, I’ve been wanting to make a single bay NAS with a 2.5″ drive to use as a small file server or for backups.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |