<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tim's blog (Posts about openbsd)</title><link>https://blog.thechases.com</link><description></description><atom:link href="https://blog.thechases.com/categories/openbsd.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:blog@tim.thechases.com"&gt;Tim Chase&lt;/a&gt; </copyright><lastBuildDate>Thu, 02 Oct 2025 19:32:42 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Old Computer Challenge</title><link>https://blog.thechases.com/posts/old-computer-challenge/</link><dc:creator>Tim Chase</dc:creator><description>&lt;h2 id="history"&gt;History&lt;/h2&gt;

&lt;p&gt;
This is the third year
in which
&lt;a href="https://bsd.network/@solene"&gt;Solene&lt;/a&gt;
has run the
&lt;a href="https://dataswamp.org/~solene/tag-oldcomputerchallenge.html"&gt;Old Computer Challenge&lt;/a&gt;
and I've tried to participate in each of them.
&lt;/p&gt;

&lt;p&gt;
Participating in these requires a little flexibility
since I work remotely for
&lt;tt&gt;$DAYJOB&lt;/tt&gt;.
The low-end computer challenges posed less issue
since neither the
&lt;abbr title="Virtual Private Network"&gt;VPN&lt;/abbr&gt;
nor
&lt;code&gt;rdesktop&lt;/code&gt;
required much in the way of resources.
Using the smaller screen-dimensions
on the older laptops
made it a bit more challenging,
but I made it work.
&lt;/p&gt;

&lt;p&gt;
None of these challenges shifted any usage to my phone.
I prefer not to use my phone for anything beyond the barest of essentials:
phone-calls,
texting,
podcasts,
timers,
lists,
and weather.
&lt;/p&gt;

&lt;h2 id="first"&gt;First year (2021)&lt;/h2&gt;

&lt;p&gt;
The
&lt;a href="https://dataswamp.org/~solene/2021-07-07-old-computer-challenge.html"&gt;first year&lt;/a&gt;
and
&lt;a href="https://dataswamp.org/~solene/2023-06-04-old-computer-challenge-v3.html"&gt;third year&lt;/a&gt;
both focused on limited hardware,
&lt;/p&gt;

&lt;p&gt;
I chose a
&lt;a href="https://www.manualslib.com/manual/270448/Gateway-Solo-1200.html#manual"&gt;Gateway Solo 1200&lt;/a&gt;
as my primary machine for the first year.
Boasting an 800MHz Celeron processor,
a 120GB spinning-rust
&lt;abbr title="hard disk drive"&gt;HDD&lt;/abbr&gt;,
a 10mbit wired LAN connection
(it also had an internal
&lt;tt&gt;wi0&lt;/tt&gt;
wireless card
and a
&lt;abbr title="Personal Computer Memory Card International Association"&gt;PCMCIA&lt;/abbr&gt;
Intel wifi option,
but both only supported
&lt;a href="https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy" title="Wired Equivalent Privacy"&gt;WEP&lt;/a&gt;
rather than
&lt;a href="https://en.wikipedia.org/wiki/Wpa2" title="Wi-fi Protected Access"&gt;WPA2&lt;/a&gt;
so I stuck with the wired option),
and upgraded to its maximum of 320MB of RAM.
This machine infamously arrived on 9/11
with the UPS driver delivering it
as I watched the twin towers fall on TV.
&lt;/p&gt;

&lt;p&gt;
The machine ran the latest release of OpenBSD without issue.
The limited CPU &amp;amp; RAM limited my choice of software notably.
Fortunately, other than web-browsing,
much of what I do happens at the command-line.
&lt;/p&gt;

&lt;p&gt;
&lt;/p&gt;&lt;dl&gt;
 &lt;dt&gt;Email&lt;/dt&gt;
 &lt;dd&gt;
  I had used
  &lt;a href="https://www.claws-mail.org/"&gt;Claws Mail&lt;/a&gt;
  (a
  &lt;abbr title="Graphical User Interface"&gt;GUI&lt;/abbr&gt;
  mail program)
  for many years but it started using more and more system resources.
  So I had aspired to switch to
  &lt;a href="http://mutt.org"&gt;&lt;code&gt;mutt&lt;/code&gt;&lt;/a&gt;
  or
  &lt;a href="https://neomutt.org/"&gt;&lt;code&gt;neomutt&lt;/code&gt;&lt;/a&gt;.
  The Old Computer Challenge gave me the kick I needed.
  Dealing with multiple accounts
  and catch-all mailboxes
  posed the worst pain-points.
  Otherwise, it ran fine
  within the limited system resources.
  And they provide a lot of power
  to mow through piles of email.
 &lt;/dd&gt;

 &lt;dt&gt;Music&lt;/dt&gt;
 &lt;dd&gt;
  I've long used
  &lt;code&gt;cmus&lt;/code&gt;
  for playing my music collection,
  and
  &lt;code&gt;pianobar&lt;/code&gt;
  for streaming.
  Both ran fine even on this ancient hardware.
 &lt;/dd&gt;

 &lt;dt&gt;Calendar&lt;/dt&gt;
 &lt;dd&gt;
  I've moved my calendaring to
  &lt;a href="https://blog.thechases.com/posts/remind/"&gt;&lt;code&gt;remind&lt;/code&gt;&lt;/a&gt;
  and it runs fine at the
  &lt;abbr title="command-line interface"&gt;CLI&lt;/abbr&gt;.
  It did have a noticeable lag on startup
  but I suspect that my 3000+ reminders/events
  cause that.
  When I winnow it down to a much more sensible volume
  of reminders, it runs in a blink.
 &lt;/dd&gt;

 &lt;dt&gt;Coding&lt;/dt&gt;
 &lt;dd&gt;
  All my coding happens at the CLI
  using a mix of
  &lt;code&gt;vi&lt;/code&gt;,
  &lt;code&gt;vim&lt;/code&gt;,
  and
  &lt;code&gt;ed&lt;/code&gt;
  for editing,
  and doing version-control with
  &lt;code&gt;git&lt;/code&gt;
  or
  &lt;code&gt;rcs&lt;/code&gt;
  so not much changed here.
  I did find notable startup lag
  both in starting
  &lt;code&gt;vim&lt;/code&gt;
  and executing Python code.
  It made me appreciate the fast startup times
  for utilities that compiled down to native code.
  I also found myself using
  &lt;code&gt;awk&lt;/code&gt;
  in a lot of places since it had a faster startup time than Python.
 &lt;/dd&gt;

 &lt;dt&gt;RSS&lt;/dt&gt;
 &lt;dd&gt;
  I've long used
  &lt;a href="https://github.com/wking/rss2email"&gt;&lt;code&gt;rss2email&lt;/code&gt;&lt;/a&gt;
  to gather my RSS feeds
  and deliver them to my inbox,
  reducing the RSS-reader issue
  to a mail issue.
  I experienced no disruption here,
  since
  &lt;code&gt;mutt&lt;/code&gt;
  let me keep reading my feeds
  just as I had done in Claws.
 &lt;/dd&gt;

 &lt;dt&gt;Social media&lt;/dt&gt;
 &lt;dd&gt;
  I accessed Twitter with
  &lt;a href="https://github.com/orakaro/rainbowstream"&gt;Rainbowstream&lt;/a&gt;,
  Mastodon with
  &lt;a href="https://github.com/magicalraccoon/tootstream/"&gt;Tootstream&lt;/a&gt;,
  and
  &lt;a href="https://github.com/michael-lazar/rtv"&gt;&lt;code&gt;rtv&lt;/code&gt;&lt;/a&gt;
  (&lt;a href="https://gist.github.com/michael-lazar/8c31b9f637c3b9d7fbdcbb0eebcf2b0a"&gt;now obsolete&lt;/a&gt;)
  for Reddit.
  For text posts and commenting,
  I loved them all.
  But for image/video posts,
  they fell short.
  I wish I had a quality CLI interface for Facebook
  to keep in touch with friends &amp;amp; family
  who only share things there.
 &lt;/dd&gt;

 &lt;dt&gt;Office stuff&lt;/dt&gt;
 &lt;dd&gt;
  Thankfully, I don't have to deal with Office documents often.
  And almost never outside of
  &lt;tt&gt;$DAYJOB&lt;/tt&gt;
  so I could use Word or Excel remotely.
  I did install Abiword for the occasional MS-Word document
  and Gnumeric for the occasional spreadsheet.
  Both provided reasonable fidelity and speed
  while running within the confines of the limited hardware.
 &lt;/dd&gt;

 &lt;dt&gt;Gaming&lt;dt&gt;
 &lt;/dt&gt;&lt;/dt&gt;&lt;dd&gt;
  I don't game much,
  so this didn't impact me much.
  I think I played a couple rounds of
  &lt;code&gt;cribbage(6)&lt;/code&gt;
  and
  &lt;code&gt;&lt;abbr title="Air Traffic Control"&gt;atc(6)&lt;/abbr&gt;&lt;/code&gt;
  as a proof-of-concept,
  but certainly no high-end
  &lt;abbr title="First Person Shooter"&gt;FPS&lt;/abbr&gt;
  games here.
 &lt;/dd&gt;

&lt;/dl&gt;


&lt;p&gt;
Web browsing hurt the most.
Firefox &amp;amp; Chromium?
Completely unusable without gobs of RAM.
For some basic browsing,
&lt;code&gt;lynx&lt;/code&gt;
and
&lt;code&gt;dillo&lt;/code&gt;
provided lightweight options,
while Epiphany clocked in at barely-usable
(but still better than Firefox &amp;amp; Chromium)
for sites requiring JavaScript.
&lt;/p&gt;

&lt;h2 id="second"&gt;Second year (2022)&lt;/h2&gt;

&lt;p&gt;
The
&lt;a href="https://dataswamp.org/~solene/2022-07-01-oldcomputerchallenge-v2-rtc.html"&gt;second year&lt;/a&gt;
focused more on limiting network usage
(both total-time and bandwidth).
&lt;/p&gt;&lt;p&gt;

&lt;/p&gt;&lt;p&gt;
I had to segregate life here since
&lt;tt&gt;$DAYJOB&lt;/tt&gt;
requires remoting into my work machine
so I didn't count that time against my allotted 1hr.
&lt;/p&gt;

&lt;p&gt;
I didn't know how to count my
&lt;code&gt;cron&lt;/code&gt;
job that downloads my podcasts nightly
since I don't have much control over
how long they run
or how much data they download.
I decided that,
since the challenge only ran for a week,
and I batch podcasts roughly every three weeks,
I could load a fresh batch to my player
before the challenge,
disable the
&lt;code&gt;cron&lt;/code&gt;
job for the week,
and then re-enable the 
&lt;code&gt;cron&lt;/code&gt;
job after completing the challenge.
Not quite the spirit of the challenge,
but also a lot like how I would download things in high-school,
where I would walk to the local campus library to download
&lt;span title="absolutely huge, like multiple megabytes!"&gt;large files&lt;/span&gt;
and bring them home.
&lt;/p&gt;

&lt;p&gt;
Email didn't pose a great concern,
since
&lt;a href="https://www.offlineimap.org/"&gt;OfflineIMAP&lt;/a&gt;
let me batch download my emails from the server,
and my local
&lt;abbr title="Mail Transfer Agent"&gt;MTA&lt;/abbr&gt;
would batch up outbound emails until I reconnected,
sending them all to my smart-host mail-server in one go.
&lt;/p&gt;

&lt;p&gt;
However, the second year really cut into social-media usage.
Its model simply doesn't accommodate offline use well.
&lt;/p&gt;

&lt;h2 id="third"&gt;Third year (2023)&lt;/h2&gt;

&lt;p&gt;
Similar to the
&lt;a href="https://blog.thechases.com/posts/old-computer-challenge/#first"&gt;first year&lt;/a&gt;
the tools remained largely the same.
However this year I did the challenge
while on vacation.
Cheating?
Maybe.
But also enforcing since I didn't take any other laptop.
This time I took a
&lt;a href="https://en.wikipedia.org/wiki/Dell_Inspiron_Mini_Series#10_Series"&gt;Dell Mini10 netbook&lt;/a&gt;
with me.
This hand-me-down came to me with 2GB of RAM,
but I'd made a few upgrades:
 &lt;/p&gt;&lt;ul&gt;
  &lt;li&gt;
   replaced the 120MB HDD with a 60GB
   &lt;abbr title="Solid State Drive"&gt;SSD&lt;/abbr&gt;
   giving a bit of extra pep
  &lt;/li&gt;
  &lt;li&gt;
   replaced the rubbish Broadcom wireless
   half-height PCI card with an Atheros chipset 
  &lt;/li&gt;
  &lt;li&gt;
   installed OpenBSD 7.3 in place of Windows Vista
  &lt;/li&gt;
 &lt;/ul&gt;


&lt;p&gt;
The netbook has no fan,
relying on passive cooling instead.
This meant that using
&lt;code&gt;apm -L&lt;/code&gt;
kept the system running cool.
I could manually 
&lt;code&gt;apm -H&lt;/code&gt;
to get the full 1.x GHz
but it came with a warm price,
discouraging me from doing so.
&lt;/p&gt;

&lt;p&gt;
The tiny 1024×600 screen resolution
gave even greater constraints
when remoting into
&lt;tt&gt;$DAYJOB&lt;/tt&gt;
but, that helped me stay in vacation-mode
rather than try to sneak in hours.
Additionally, X seemed to think the display
offered 1024×768 resolution,
so everything rendered with a squishing/scaling
that ruined friends' pictures.
And equally bad,
the Poulsbo chipset
lacked support in X,
so it rendered
&lt;em&gt;very slowly&lt;/em&gt;
using VESA.
But I had times where I could watch text render character-by-character,
and could type full paragraphs of text
before the first couple words appeared on the screen.
With better graphics-support,
I suspect it would have felt notably snappier.
&lt;/p&gt;

&lt;h2 id="future"&gt;Future challenges&lt;/h2&gt;

&lt;p&gt;
After returning from that vacation,
I purchased a new laptop for travel,
and got rid of four of my old junker laptops
(my beloved rejoices at fewer laptops on my desk).
I still have the Mini10
and a
&lt;abbr title="PowerPC"&gt;PPC&lt;/abbr&gt;
&lt;a href="https://en.wikipedia.org/wiki/IBook#iBook_G4_(%22Snow%22)"&gt;iBook G4&lt;/a&gt;
running OpenBSD,
so I can participate in future challenges.
&lt;/p&gt;</description><category>ed</category><category>openbsd</category><guid>https://blog.thechases.com/posts/old-computer-challenge/</guid><pubDate>Mon, 10 Jul 2023 13:52:33 GMT</pubDate></item><item><title>chrooted SFTP</title><link>https://blog.thechases.com/posts/bsd/chrooted-sftp/</link><dc:creator>Tim Chase</dc:creator><description>&lt;h2&gt;Creating &lt;code&gt;chroot&lt;/code&gt; SFTP accounts&lt;/h2&gt;

&lt;p&gt;
For
&lt;code&gt;$DAYJOB&lt;/code&gt;
I had to create user accounts for customers
and give them access to
&lt;abbr title="Secure File Transfer Protocol"&gt;SFTP&lt;/abbr&gt;
files to/from secured areas of our server.
We wanted to use
&lt;code&gt;chroot&lt;/code&gt;
functionality to ensure
that no customer could see other customers' data,
and prevent them from poking around
potentially sensitive areas of the server.
After a bit of trial-and-error,
I've listed the lessons-learned here
in a cook-book fashion
so that in case I ever have to do it again,
I have the steps documented.
&lt;/p&gt;

&lt;p&gt;
This post was spurred to exist
thanks to
&lt;a href="https://www.reddit.com/r/openbsd/comments/pfc8sq/encrypted_ftp_server_on_openbsd_69/"&gt;this Reddit post asking about creating
an encrypted FTP server on OpenBSD
&lt;/a&gt;
so
&lt;a href="https://www.reddit.com/r/openbsd/comments/pfc8sq/encrypted_ftp_server_on_openbsd_69/hb4dt31/"&gt;my reply there&lt;/a&gt;
became the basis for this post.
&lt;/p&gt;

&lt;!-- TEASER_END --&gt;

&lt;h2&gt;Steps to reproduce&lt;/h2&gt;

&lt;ol&gt;

&lt;li&gt;
create the "sftp users" group,
which I'll refer to here as
&lt;var&gt;customers&lt;/var&gt;

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;groupadd &lt;var&gt;customers&lt;/var&gt;
&lt;/pre&gt;
&lt;/figure&gt;

&lt;/li&gt;

&lt;li&gt;
create the new user.
For this example, I use
"&lt;var&gt;acmecorp&lt;/var&gt;"
but I define the variable
&lt;code&gt;&lt;var&gt;$NEWUSER&lt;/var&gt;&lt;/code&gt;
and use it throughout the rest of this post:

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt; adduser
&lt;label class="root"&gt;root# &lt;/label&gt; NEWUSER=acmecorp
&lt;/pre&gt;
&lt;/figure&gt;

&lt;/li&gt;

&lt;li&gt;
add them to the
&lt;code&gt;customers&lt;/code&gt;
group when prompted for the "other groups" or,
if you have a pre-existing user,
use

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;usermod -G&lt;var&gt;customers&lt;/var&gt; &lt;var&gt;$NEWUSER&lt;/var&gt;
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
to put them in their own
&lt;code&gt;chroot&lt;/code&gt;
we need to create a fake hierarchy in
&lt;code&gt;/home/$NEWUSER/&lt;/code&gt;
so we'll end up with
&lt;code&gt;/home/$NEWUSER/home/$NEWUSER/&lt;/code&gt;
&lt;/li&gt;

&lt;li&gt;
make a temporary "user" directory
and create the fake
&lt;code&gt;/home&lt;/code&gt;
inside that

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;CHROOT="$(mktemp -d -p /home)"
&lt;label class="root"&gt;root# &lt;/label&gt;mkdir -p "${CHROOT}/home/"
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
set the permissions &amp;amp; ownership
on that fake hierarchy:

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;chown -R root:wheel "$CHROOT"
&lt;label class="root"&gt;root# &lt;/label&gt;chmod -R 0755 "$CHROOT"
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
move the user's old home directory under the chrooted
&lt;code&gt;/home&lt;/code&gt;

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;mv -v "/home/$NEWUSER" "$CHROOT"/home/
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
and then rename the chroot back to the original
&lt;code&gt;/home/$NEWUSER&lt;/code&gt;
directory
&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;mv -v "$CHROOT" "/home/$NEWUSER"
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
while a bit confusing,
I found that some users expected to have
&lt;var&gt;$SFTP&lt;/var&gt;
drop them in
&lt;code&gt;/&lt;/code&gt;
and be able to do a relative
&lt;code&gt;cd home/$USER&lt;/code&gt;
while others expect to be dropped in their
&lt;code&gt;$HOME&lt;/code&gt;
so by adding a fake
&lt;code&gt;home/$USER&lt;/code&gt;
that points to the right place, it allows for both of these.  This might be optional, but helps me stave off customer script breakage:

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;mkdir -p "/home/$NEWUSER/home/$NEWUSER/home"
&lt;label class="root"&gt;root# &lt;/label&gt;ln -s .. "/home/$NEWUSER/home/$NEWUSER/home/$NEWUSER"
&lt;/pre&gt;
&lt;/figure&gt;

It might also stave off issues with the next step,
since the home directory in
&lt;code&gt;/etc/passwd&lt;/code&gt;
can point to
&lt;code&gt;/home/$NEWUSER/home/$NEWUSER&lt;/code&gt;
regardless of whether in the chroot or not
and still point to the right place.
&lt;/li&gt;

&lt;li&gt;
we've messed with their home directory,
so update
&lt;code&gt;/etc/passwd&lt;/code&gt;
to reflect where things should find the home directory now
&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;usermod -d "/home/$NEWUSER/home/$NEWUSER" "$NEWUSER"
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;li&gt;
now the user is configured properly,
so let
&lt;code&gt;sshd&lt;/code&gt;
know how to treat members of the
&lt;var&gt;customers&lt;/var&gt;
group.
Edit your
&lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;
to include this block at the end:

&lt;figure&gt;
&lt;pre&gt;
Match Group customers
   ChrootDirectory /home/%u
   ForceCommand internal-sftp
   PermitTunnel no
   AllowTcpForwarding no
   AllowAgentForwarding no
   X11Forwarding no
&lt;/pre&gt;
&lt;figcaption&gt;/etc/ssh/sshd_config&lt;/figcaption&gt;
&lt;/figure&gt;

I don't know whether
&lt;code&gt;ForceCommand&lt;/code&gt;
kills off the ability to do
&lt;code&gt;PermitTunnel&lt;/code&gt;,
&lt;code&gt;AllowTcpForwarding&lt;/code&gt;,
&lt;code&gt;AllowAgentForwarding&lt;/code&gt;,
&lt;code&gt;X11Forwarding&lt;/code&gt;,
but I prefer to be explicit in my
"just in case, no, you can't do that either".
&lt;/li&gt;

&lt;li&gt;
Send a
&lt;code&gt;SIGHUP&lt;/code&gt;
to
&lt;code&gt;sshd&lt;/code&gt;
to pick up the new configuration:
&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;kill -HUP $PIDOFSSHD
&lt;/pre&gt;
&lt;/figure&gt;
or use your system's reload configuration utility like
&lt;code&gt;rcctl&lt;/code&gt;
on OpenBSD
to pick up the new configuration:
&lt;figure&gt;
&lt;pre&gt;
&lt;label class="root"&gt;root# &lt;/label&gt;rcctl reload sshd
&lt;/pre&gt;
&lt;/figure&gt;
&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;
And with that,
you should have chrooted SFTP access for
&lt;var&gt;$NEWUSER&lt;/var&gt;

&lt;figure&gt;
&lt;pre&gt;
&lt;label class="user"&gt;user$ &lt;/label&gt;sftp &lt;var&gt;user&lt;/var&gt;@&lt;var&gt;hostname&lt;/var&gt;
&lt;/pre&gt;
&lt;/figure&gt;

(if not,
check the tail of your
&lt;code&gt;/var/log/authlog&lt;/code&gt;
for hints).

However if you try to
&lt;code&gt;ssh&lt;/code&gt;,
&lt;code&gt;scp&lt;/code&gt;,
or
&lt;code&gt;rsync&lt;/code&gt;,
it should reject your efforts
at the point you've entered your credentials:
&lt;figure&gt;
&lt;pre&gt;
&lt;label class="user"&gt;user$ &lt;/label&gt;ssh &lt;var&gt;user&lt;/var&gt;@&lt;var&gt;hostname&lt;/var&gt;
Password:
Permission denied, please try again.
⋮

&lt;label class="user"&gt;user$ &lt;/label&gt;echo test &amp;gt; delme
&lt;label class="user"&gt;user$ &lt;/label&gt;scp delme &lt;var&gt;user&lt;/var&gt;@&lt;var&gt;hostname&lt;/var&gt;:
Password:
Permission denied, please try again.
⋮
&lt;/pre&gt;
&lt;/figure&gt;

&lt;/p&gt;

&lt;p&gt;
For additional customers,
you can repeat steps 2 through 9.

I've created a shell-script
to do those steps
as well as a bit of other administrivia for
&lt;code&gt;$DAYJOB&lt;/code&gt;
but that should give you the basics.
&lt;/p&gt;</description><category>openbsd</category><guid>https://blog.thechases.com/posts/bsd/chrooted-sftp/</guid><pubDate>Mon, 30 Aug 2021 19:35:08 GMT</pubDate></item><item><title>Green terminal theme on OpenBSD</title><link>https://blog.thechases.com/posts/green-terminal-theme-on-openbsd/</link><dc:creator>Tim Chase</dc:creator><description>&lt;p&gt;
Inspired by a recent post on Reddit where someone created an
&lt;a href="https://www.reddit.com/r/unixporn/comments/27hsi1/openbsdcwm_amber_monochrome/"&gt;amber monochrome theme on OpenBSD running CWM&lt;/a&gt;
I decided to undertake a similar venture to do a green-on-black theme
for CWM on OpenBSD.
&lt;/p&gt;

&lt;!-- TEASER_END --&gt;

&lt;h2&gt;Terminal font&lt;/h2&gt;
&lt;p&gt;
First, I wanted a font that looked a bit more like the classic terminal
fonts I remembered from the 80s so I found
&lt;a href="https://www.dafont.com/perfect-dos-vga-437.font"&gt;DOS terminal font&lt;/a&gt;
(&lt;a href="https://dl.dafont.com/dl/?f=perfect_dos_vga_437"&gt;direct link&lt;/a&gt;)
which provides classic VGA fonts.
&lt;/p&gt;

&lt;p&gt;
To install them, first I needed to install 
&lt;code&gt;unzip&lt;/code&gt;
with
&lt;code&gt;doas pkg_add unzip&lt;/code&gt;
to uncompress them.
Next, create the font directory where X will pick up the new fonts
&lt;code&gt;mkdir -p ~/.local/share/fonts/&lt;/code&gt;
dump the fonts there, and instruct X to pick up the new fonts:
&lt;/p&gt;

&lt;figure&gt;
&lt;pre&gt;
$ ftp -o dos_fonts.zip https://dl.dafont.com/dl/?f=perfect_dos_vga_437
$ unzip dos_fonts.zip
$ fc-cache -f
&lt;/pre&gt;
&lt;/figure&gt;


&lt;p&gt;
Then I configured my
&lt;code&gt;~/.Xdefaults&lt;/code&gt;
to use green-on-black and my custom VGA font just about everywhere.
It also sets a few other preferences like how much scrollback an
&lt;code&gt;xterm&lt;/code&gt;
stores, where it appears by default, and whether the scrollbar is
visible.
&lt;/p&gt;

&lt;figure&gt;
&lt;pre&gt;
$ cat ~/.Xdefaults
*Background: black
*Foreground: #00c000
*HiBackColor: green
*HiForeColor: black
*faceName: Perfect DOS VGA 437:size=10
*font: Perfect DOS VGA 437:size=10
XTerm*loginShell:true
XTerm*saveLines: 5000
XTerm*geometry: 80x25-0+0
XTerm*scrollBar: false
&lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;
Next, I configured my
&lt;code&gt;~/.xinitrc&lt;/code&gt;
to set either my black wireframe image of Puffy as the background or set
it to solid black if
&lt;code&gt;feh&lt;/code&gt;
isn't installed.
I usually link
&lt;code&gt;~/.xinitrc&lt;/code&gt;
and
&lt;code&gt;~/.xsession&lt;/code&gt;
so that it works whether I launch it from
&lt;code&gt;xdm&lt;/code&gt;/&lt;code&gt;xenodm&lt;/code&gt;
or by using
&lt;code&gt;startx&lt;/code&gt;
on the command-line.
&lt;/p&gt;

&lt;figure&gt;
&lt;pre&gt;
$ cat ~/.xinitrc
xrdb -m $HOME/.Xdefaults
#disable the beeper
xset b off
# set the background
feh --bg-fill puffy.png || xsetroot -solid black
# start a few apps
xconsole -geometry +0-0 &amp;amp;
xterm &amp;amp;
# launch cwm
exec cwm
&lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;
Finally, for the window manager trappings, I set my colors to various
greens and blacks.
&lt;/p&gt;

&lt;figure&gt;
&lt;pre&gt;
$ cat ~/.cwmrc
sticky yes
borderwidth 1
# border colors
color activeborder green
color inactiveborder darkgreen
color urgencyborder green
# menu colors
color menubg black
color font green
color menufg green
color selfont black
&lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;
Restarting my
&lt;code&gt;X&lt;/code&gt;
session brought everything up in a delightful green-on-black that looked
a little something like
&lt;a href="https://twitter.com/gumnos/status/967157666668863488"&gt;this
screenshot&lt;/a&gt;.
&lt;/p&gt;

&lt;h3&gt;Configuring
&lt;code&gt;xenodm&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;
Now, it's nice if your personal
&lt;code&gt;X&lt;/code&gt;
session is green-on-black, but what if you want the
&lt;code&gt;xenodm&lt;/code&gt;
login to also display green-on-black?
Well, we can do that too.
Before starting, I like to take snapshots of the files I'm editing in
case I hose them:
&lt;/p&gt;

&lt;figure&gt;
&lt;pre&gt;
# cd /etc/X11/xenodm/
# mkdir RCS
# ci -l Xresources
# ci -l Xsetup_0
&lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;
First, all the foreground and background colors in
&lt;code&gt;/etc/X11/xenodm/Xresources&lt;/code&gt;
should be tweaked for various shades of green.
Some parts of the file allowed setting the color based on the display's
bits-per-pixel, so for high color-depth, I chose more nuanced colors,
while for the lower color-depth, I stuck to
&lt;code&gt;darkgreen&lt;/code&gt;
and
&lt;code&gt;green&lt;/code&gt;.
While in there, you can also change the
&lt;code&gt;logoFileName&lt;/code&gt;
properties to point to the green-on-black wireframe image of Puffy if
you have one.
&lt;/p&gt;

&lt;p&gt;
Then, in
&lt;code&gt;Xsetup_0&lt;/code&gt;
above the line that launches
&lt;code&gt;xconsole&lt;/code&gt;
I like to specify
&lt;code&gt;xsetroot -solid black&lt;/code&gt;
to get a black background as well.
&lt;/p&gt;</description><category>openbsd</category><guid>https://blog.thechases.com/posts/green-terminal-theme-on-openbsd/</guid><pubDate>Tue, 20 Feb 2018 14:23:22 GMT</pubDate></item></channel></rss>