ubuntussh

Disable ssh message


When I connect to Ubuntu-based Docker container via SSH, following message will be shown every time.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

I want to disable showing it, but I couldn't find how.
Is there any way to do it? If it's possible, please let me know how.


Solution

  • My answer for now:

     sed -i 's/PrintLastLog yes/PrintLastLog no/' /etc/ssh/sshd_config
     touch /home/$USER/.hushlogin
    

    I need PrintLastLog no and a .hushlogin file in the home directory.