<?xml version="1.0"?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tyler Cipriani: pages tagged soc</title>
<link>https://tylercipriani.com/tags/soc/</link>
<atom:link href="https://tylercipriani.com/tags/soc/index.rss" rel="self" type="application/rss+xml"/>

<description>Tyler Cipriani</description>
<generator>ikiwiki</generator>
<pubDate>Tue, 14 Feb 2017 15:11:05 +0000</pubDate>
<item>
	<title>Beaglebone Black Setup on Debian 8</title>

	<guid isPermaLink="false">https://tylercipriani.com/blog/2016/04/01/beaglebone/</guid>

	<link>https://tylercipriani.com/blog/2016/04/01/beaglebone/</link>

	<dc:creator>Tyler Cipriani</dc:creator>



	<category>computing</category>

	<category>notes</category>

	<category>soc</category>


	<pubDate>Fri, 01 Apr 2016 21:01:25 +0000</pubDate>
	<dcterms:modified>2017-02-14T15:11:05Z</dcterms:modified>


	<description>&lt;section id=&quot;flash-emmc-with-latest-debian-image&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Flash eMMC with latest Debian image &lt;a href=&quot;https://tylercipriani.com/tags/soc/#flash-emmc-with-latest-debian-image&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Download Debian image [whatever].img.xz
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://beagleboard.org/latest-images&quot;&gt;http://beagleboard.org/latest-images&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;unxz&lt;/span&gt; bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Insert microSD card and make sure that it is unmounted
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lsblk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fdisk -l&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the img to the microSD card&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; dd bs=4 if=bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img of=/dev/mmcblk0 conv=fsync&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This step will take a lot of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mount the microSD card and make sure it flashes to the beaglebone:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; mount /dev/mmcblk0p1 /mnt/sd-card&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;vim&lt;/span&gt; /mnt/sd-card/boot/uEnv.txt&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Uncomment the line:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;va&quot;&gt;cmdline=&lt;/span&gt;init=&lt;span class=&quot;ex&quot;&gt;/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Hookup the &lt;a href=&quot;https://www.adafruit.com/products/954&quot;&gt;USB-to-serial cable&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Connect &lt;strong&gt;Black Wire&lt;/strong&gt; to &lt;strong&gt;Pin 1&lt;/strong&gt; (closest to 5v barrel)&lt;/li&gt;
&lt;li&gt;Connect &lt;strong&gt;Green Wire&lt;/strong&gt; to &lt;strong&gt;Pin 4&lt;/strong&gt; (2 pins from pin 1)&lt;/li&gt;
&lt;li&gt;Connect &lt;strong&gt;White Wire&lt;/strong&gt; to &lt;strong&gt;Pin 5&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Connect to USB, check output of &lt;code&gt;dmesg&lt;/code&gt; for which &lt;code&gt;/dev/&lt;/code&gt; the serial connection is on&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to serial connection via screen&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;screen&lt;/span&gt; /dev/ttyUSB0 115200&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;put sdcard in BBB and power up, hold the S2 button, power up&lt;/li&gt;
&lt;li&gt;Wait, the status lights will flash in a cylon pattern, you can watch the eMMC flash progress via &lt;code&gt;screen&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All User LEDs should be solid on completion&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More info is available on the &lt;a href=&quot;http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#FAQ&quot;&gt;BeagleBoneBlack Wiki&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;initial-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Initial setup &lt;a href=&quot;https://tylercipriani.com/tags/soc/#initial-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;connect-over-ssh&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Connect over SSH &lt;a href=&quot;https://tylercipriani.com/tags/soc/#connect-over-ssh&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To connect via ssh: plugin beaglebone to computer via SSH&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ssh&lt;/span&gt; -l root 192.168.7.2&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;wifi-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Wifi Setup &lt;a href=&quot;https://tylercipriani.com/tags/soc/#wifi-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Plugin the &lt;a href=&quot;https://www.adafruit.com/products/814&quot;&gt;wifi adapter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reboot (unplug it and plug it back in)&lt;/li&gt;
&lt;li&gt;Generate your pre-shared key using &lt;code&gt;wpa_passphrase&lt;/code&gt; (see &lt;a href=&quot;https://wiki.debian.org/WiFi/HowToUse#WPA-PSK_and_WPA2-PSK&quot;&gt;Debian Wiki&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;vim &lt;code&gt;/etc/network/interfaces&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;/etc/network/interfaces&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;auto&lt;/span&gt; wlan0&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;iface&lt;/span&gt; wlan0 inet dhcp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;wpa-ssid&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;network-name&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-4&quot; title=&quot;4&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;wpa-psk&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;network-password&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ifdown wlan0; ifup wlan0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;ip -o addr show&lt;/code&gt; to confirm that you have an ip address&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id=&quot;update-debian&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Update debian &lt;a href=&quot;https://tylercipriani.com/tags/soc/#update-debian&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use the &lt;a href=&quot;https://debian-handbook.info/browse/stable/sect.automatic-upgrades.html&quot;&gt;Debian Upgrade Script&lt;/a&gt; to update debian:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;~/bin/upgrade-debian&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Debian auto-upgrade script&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;co&quot;&gt;# https://debian-handbook.info/browse/stable/sect.automatic-upgrades.html&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-4&quot; title=&quot;4&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;co&quot;&gt;# kill all cached creds&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; -k&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-7&quot; title=&quot;7&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;co&quot;&gt;# ask for new creds&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; -v&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-10&quot; title=&quot;10&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;bu&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;DEBIAN_FRONTEND=&lt;/span&gt;noninteractive&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-12&quot; title=&quot;12&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get update&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;yes&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get -y -o Dpkg::Options::=&lt;span class=&quot;st&quot;&gt;&amp;quot;--force-confdef&amp;quot;&lt;/span&gt; -o Dpkg::Options::=&lt;span class=&quot;st&quot;&gt;&amp;quot;--force-confold&amp;quot;&lt;/span&gt; dist-upgrade&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;basic-security&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Basic security &lt;a href=&quot;https://tylercipriani.com/tags/soc/#basic-security&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;make-a-root-password&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Make a root password &lt;a href=&quot;https://tylercipriani.com/tags/soc/#make-a-root-password&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;code&gt;pwgen&lt;/code&gt;: &lt;code&gt;sudo apt-get install pwgen&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Generate a root password: &lt;code&gt;pwgen -Bsy 16 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Store that password in your password store—you&#39;ll never remember it&lt;/li&gt;
&lt;li&gt;Login to beaglebone via ssh, run &lt;code&gt;passwd&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;add-a-privileged-non-root-user&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Add a privileged non-root user &lt;a href=&quot;https://tylercipriani.com/tags/soc/#add-a-privileged-non-root-user&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generate a non-privileged user password: &lt;code&gt;pwgen -Bsy 16 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Save password in password store&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the user&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; groupadd sudo-user&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; groupadd ssh-user&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;useradd&lt;/span&gt; tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; /home/tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; /home/tyler/.ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;touch&lt;/span&gt; /home/tyler/.ssh/authorized_keys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chown&lt;/span&gt; -R tyler:tyler /home/tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chmod&lt;/span&gt; 700 /home/tyler/.ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chmod&lt;/span&gt; 600 /home/tyler/.ssh/authorized_keys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; -a -G sudo-user tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; -a -G ssh-user tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-12&quot; title=&quot;12&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; --shell /bin/bash tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;passwd&lt;/span&gt; tyler&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;give that user sudo privileges
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;EDITOR=vim visudo -f /etc/sudoers.d/sudo-user&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add the line: &lt;code&gt;%sudo-user ALL=(ALL) NOPASSWD:ALL&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add your laptop&#39;s key to user&#39;s &lt;code&gt;authorized_keys&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;# This should happen from your local machine: laptop/desktop/whatever&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;cat&lt;/span&gt; ~/.ssh/id_rsa.pub &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;ssh&lt;/span&gt; -l tyler 192.168.7.2 &lt;span class=&quot;st&quot;&gt;&amp;#39;mkdir -p .ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;remove-demo-user&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Remove demo user &lt;a href=&quot;https://tylercipriani.com/tags/soc/#remove-demo-user&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;userdel -fr debian&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;lockdown-ssh&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Lockdown ssh &lt;a href=&quot;https://tylercipriani.com/tags/soc/#lockdown-ssh&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Generate better hostkeys&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; /etc/ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;rm&lt;/span&gt; ssh_host_*key*&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ssh-keygen&lt;/span&gt; -t rsa -b 4096 -f ssh_host_rsa_key &lt;span class=&quot;op&quot;&gt;&amp;lt;&lt;/span&gt; /dev/null&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modfiy &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; to make it like below:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;/etc/ssh/sshd_config&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Ciphers&lt;/span&gt; aes256-ctr,aes192-ctr,aes128-ctr&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;KexAlgorithms&lt;/span&gt; diffie-hellman-group-exchange-sha256&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;MACs&lt;/span&gt; hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Protocol&lt;/span&gt; 2&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;HostKey&lt;/span&gt; /etc/ssh/ssh_host_rsa_key&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PubkeyAuthentication&lt;/span&gt; yes&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PermitRootLogin&lt;/span&gt; no&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PasswordAuthentication&lt;/span&gt; no&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;ex&quot;&gt;AllowGroups&lt;/span&gt; ssh-user&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Restart SSH &lt;code&gt;service ssh restart&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open a new terminal window and make sure you can still login (you may need to delete and reaccept hostkeys)&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;fun-stuff&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Fun Stuff &lt;a href=&quot;https://tylercipriani.com/tags/soc/#fun-stuff&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Change ssh banner:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get install figlet&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;$1 !~ /default/&amp;#39;&lt;/span&gt; /etc/issue.net &lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; ~/issue.net &lt;span class=&quot;kw&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; mv ~/issue.net /etc/issue.net&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; sh -c &lt;span class=&quot;st&quot;&gt;&amp;#39;figlet BeagleBone &amp;gt;&amp;gt; /etc/issue.net&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;BeagleBone pin-out
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://stuffwemade.net/post/beaglebone-pinout&quot;&gt;http://stuffwemade.net/post/beaglebone-pinout&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;things-to-remember&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Things to remember &lt;a href=&quot;https://tylercipriani.com/tags/soc/#things-to-remember&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;thank god for 1wire temp sensor blog posts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://interactingobjects.com/ds18b20-temperature-sensor-on-a-beaglebone-black-running-ubuntu/&quot;&gt;http://interactingobjects.com/ds18b20-temperature-sensor-on-a-beaglebone-black-running-ubuntu/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://klaus.ede.hih.au.dk/index.php/BBB_and_OneWire&quot;&gt;http://klaus.ede.hih.au.dk/index.php/BBB_and_OneWire&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;iwconfig when can&#39;t find wlan0 interface (could be wlan1)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
</description>


	<comments>//tylercipriani.com/blog/2016/04/01/beaglebone/#comments</comments>

</item>

</channel>
</rss>
