Skip to content

Commit

Permalink
new post
Browse files Browse the repository at this point in the history
  • Loading branch information
1dancook committed Jul 4, 2024
1 parent 356d648 commit 99e1195
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions _posts/2024-07-04-rpi-motd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Silencing SSH Login and MOTD on Raspberry Pi
layout: post
---

I was trying to do a simple transfer with rsync (via ssh) and ran into an issue. I remember seeing "error 2" and "Is your shell clean?"

How did my shell get dirty?

After a brief search I found that any kind of MOTD or printed login information would be bad for rsync. In other words, rsync expects to receive *nothing* when accessing a remote system and MOTD and friends would give it *something*.

To remove everything (this was on a fresh install of Raspbian Bookworm):

```bash
# the nuclear option

# delete MOTD
sudo rm /etc/motd

# delete the dynamic MOTD script for uname
sudo rm /etc/update_motd.d/10-uname

# silence anything else with this hidden file in $HOME
touch ~/.hushlogin
```

0 comments on commit 99e1195

Please sign in to comment.