I have changed /etc/issue.net
, so I have set a "personal" message after typing a username in an SSH terminal. Now I am trying to change the welcome text after successful login.
I have found a lot of posts about the /etc/motd
file, but the part "Welcome to Ubuntu blabla versionnumber and so on" + "* Documentation URL " is not there?
I just do not want to show OS info in my SSH terminal, I already know what I have installed. ๐
I only want to see my last login. And also not errors; errors belong in a logfile.
Which file do I have to edit?
Best Answer
The welcome messages are generated by the files residing in
/etc/update-motd.d/
.From
man update-motd
:So if you don't want the outputs of those scripts upon login via
ssh
just remove the execute flag on them:Now if you want to show something you want upon login, you have two options:
Make a script, put it in
/etc/update-motd.d/
, make it executable, also make sure it outputs on STDOUT.ssh
has aBanner
option. You can put the text in a file and set it in theBanner
option so that the content of the file is shown upon login viassh
. Note that this is applicable to onlyssh
.From
man 5 sshd_config
: