We regularly see that the so-called deploy services suffer from output that we generate when logging in via SSH (e.g. pre-login/motd). This output has the function to show the user important information, but in the case of automatic processes this is not always desirable. This behavior is often fairly easy to fix.
In all cases you need to pass the -q parameter in the SSH command (we assume you are using the OpenSSH client). This will suppress the pre-login message. To also skip the Last Login message you need to create a .hushlogin file ( touch ~/.hushlogin ) on your server.
A deploy process can log in in 2 ways, namely with a:
In a login shell the .bash_profile is read and the MOTD is also shown. You can suppress this in 2 ways:
In this case the .bash_profile file is ignored and you just need to pass the -q parameter with SSH and create the .hushlogin file.