Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Today in #FreeSoftwareAdvent it's the venerable ssh(1)/sshd(8)

Uncategorized
1 1 3
  • Today in it's the venerable ssh(1)/sshd(8)

    While I grew up in an age where telnet(1) was my only option, the ssh folks made it a pretty drop-in replacement for the sorts of things I did with telnet, so switching was easy.

    With the exception of when I'm rebooting or our ISP is having issues, I almost always have at least one SSH connection open and likely more than one connection to other hosts. Even in the "security" of our LAN in the house, I still SSH between machines rather than use unencrypted connections for transfer.

    I love being able to run things remotely and use them locally, such as

    $ ssh me@remote dmesg | xsel -ib

    to put the remote machine's dmesg output on my system clipboard or

    $ tar czvf - /path/to/data | ssh me@remote 'cd /destination/path ; tar xzf -'

    to transfer a directory tree to a remote machine.

    It generally has sensible defaults, allows me to force key-based authentication rather than username+password auth.

    It allows me to limit $DAYJOB customers to SFTP-only access within their designated chroot directories, insulating them from each other.

    I use it to tunnel into work and forward my RDP VM's screen so I can access it locally with rdesktop(1)

    So many delightful little uses.

    Definitely worth reading @mwl's SSH book to learn more: https://mwl.io/archives/3126

  • stefano@mastodon.bsd.cafeundefined stefano@mastodon.bsd.cafe shared this topic on

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    2 Views
    Today in #FreeSoftwareAdvent, it's pf(4)Having lived through several iterations of firewall management tools on Linux (and FreeBSD offers both IPFW, IPFilter, and pf in the base system), I've come appreciate the simplicity and declarative nature of pf.conf for my firewall management.The only downside is the quirky syntax of pfctl(8) but I do like being able to run my rules through it to sanity-check them from vi/ed with:w !pfctl -nvf -before installing them.
  • 0 Votes
    1 Posts
    3 Views
    Today's follow-up #FreeSoftwareAdvent entry is vi/vim.Which I use depends on the situation. Classic vi/nvi tends to be lighter weight and start faster, while vim offers extra features that I find particularly useful). I usually just type `vi` which gets me `vi` on OpenBSD, `nvi` on FreeBSD, and `vim` (or `vim-tiny`) on most flavors of Linux. If I specifically want vim features, I'll invoke it as such directly.I could go on for ages about favorite features, but a select few:• the ability to keep my hands on the home row and not use a mouse is helpful for preventing RSI symptoms• it's a language¹ of editing, involving counts, verbs/commands, and objects/motions, so I can express my editing *intent* and then use the period command to re-issue that same editing *intent*• the :global or :substitute commands can make massive-yet-precise edits across huge files• the :*do commands extend that power across multiple files, allowing me to precisely edit millions of lines across thousands of files with targeted precision• it's ubiquitous—even as some Linux distros have started removing ed(1) from the base installs , relegating it to packages, I can always type `vi` on any Unix-like/POSIX system and be editing with a powerful editor. And with builds for Windows and my phone, I can use it everywhere. No need to install anything• they work just fine over a SSH connection without a GUI, and use minimal resources so they work even on that old hardware from the 90s.⸻¹ https://gist.github.com/nifl/1178878
  • 0 Votes
    1 Posts
    2 Views
    Though a bit niche, my #FreeSoftwareAdvent today is ed(1). As the goofball behind @ed1conf, I certainly play it up, but I certainly use it more than the average Unix/BSD/Linux user.A while ago I wrote up list of reasons¹ why one might use ed, and some are more obscure/improbable reasons (though I've encountered all of them in that post), there are a couple of those that drive me back to ed regularly:• I can still see the output of previous commands on the screen while I edit, where a full-screen editor would obscure that output that I need to incorporate in my edit• it's just darn fast for a quick edit, changing a variable name or adding/removing an entry in a list, etc. No startup costs for a honkin' huge $VISUAL with dozens of plugins and language-server processes and GUI rendering• very usable on low-bandwith/high-latency connections like I sometimes get when I remote into machines (less of a problem now, but I still experience sessions where I'll SSH in, invoke ed, make the change, write & quit, and exit the shell, in a couple seconds, while the screen repaints things oh-so-slowly• and most importantly, there's quality geek-cred for using it in front of others 😆⸻¹ https://blog.thechases.com/posts/cli/why-ed1/
  • 0 Votes
    1 Posts
    5 Views
    Today's #FreeSoftwareAdvent entry: ledger(1) & hledger(1)I primarily use ledger use for my #plaintextaccounting purposes¹ but try to mostly keep my data-files in a form that hledger can process them too.Getting started involved a crash-course in accounting terms, but the use of positive/negative numbers (rather than "debits" and "credits" which always bugged me; though both have ways of specifying that output should be in credit/debit format) eased the transition.While it started a little tedious, a few helper-scripts and shell-functions simplified adding new common entries and gave me lazy access to common reports.I still struggle a little bit with closing the books (I though I'd figured it out, and documented it², but had some hiccups so I'll need to revisit my documentation in January)But it's been incredibly helpful to see and track our household net worth, spot trends, keep tabs on gift-card balances that would otherwise get forgotten, track invoices sent to clients, and it simplifies balancing the checkbook monthly.⸻¹ http://plaintextaccounting.org/² https://blog.thechases.com/posts/closing-out-the-books-in-ledger/