I'm executing some commands on remote server within a shell script like this:
ssh user@host <<ENDSSH
...
ENDSSH
Upon login I'm getting a standard server welcome message echoed. Is there a way to send it to \dev\null
but to keep displaying the output of executed commands?
Thanks.
Create a file ~user/.hushlogin
on the remote host. This will suppress output from the login
program when user
logs in (such as time of last login and any message of the day).
You can edit /etc/ssh/sshd_config
(for debian/ubuntu, your server might be different file) and turn the following setting to 'no'.
PrintMotd no
PrintLastLog no
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With