-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |