Reputation: 9100
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.
Upvotes: 5
Views: 1730
Reputation: 11084
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
Upvotes: 1
Reputation: 531235
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).
Upvotes: 4