diff --git a/_posts/2024-07-04-rpi-motd.md b/_posts/2024-07-04-rpi-motd.md new file mode 100644 index 0000000..4230a19 --- /dev/null +++ b/_posts/2024-07-04-rpi-motd.md @@ -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 +``` \ No newline at end of file