How can I disable the MOTD when using Git over SSH on Windows?



Motd (message of the day) is a feature used by some operating systems and software applications to display messages to users when they log in. It is commonly used to inform users about system updates or to provide useful tips. However, for some applications, such as Git version control system, displaying Motd can be unnecessary. In this article, we will discuss how to disable Motd when using Git over SSH on Windows.

The Motd feature is implemented in two ways on Windows: by the login shell, and by the SSH server. Both of these can be used to display messages to users when they log in. For example, the SSH server can be configured to display the Motd if it is enabled.

To disable the Motd when using Git over SSH on Windows, the first step is to configure the SSH server. This can be done by editing the sshd_config file, which is located in the C:\\Program Files\\OpenSSH\\etc directory. Inside this file, find the line that reads “PrintMotd yes” and change it to “PrintMotd no”. This will disable the Motd when users log in via SSH.

The second step is to configure the login shell. This can be done by editing the profile file, which is located in the C:\\Users\\[username]\\ directory. Inside this file, find the line that reads “PrintMotd yes” and change it to “PrintMotd no”. This will disable the Motd when users log in via the login shell.

Finally, the Git client should be configured to not display the Motd. This can be done by editing the config file, which is located in the C:\\Users\\[username]\\.git directory. Inside this file, find the line that reads “PrintMotd yes” and change it to “PrintMotd no”. This will disable the Motd when users use the Git client.

Once these steps have been completed, the Motd will be disabled when using Git over SSH on Windows. This can be useful for users who find the Motd messages to be unnecessary or distracting. It also ensures that users are presented with the most up-to-date information when they log in.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo