LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SSH login message (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-login-message-618668/)

s1cK 02-04-2008 04:08 PM

SSH login message
 
Hello,
this is maybe a stupid question, but still im newbie and i like to ask.
I'm interested .. how to change message that you get when you connect to the server via putty or other ssh client.
I get some anoying messages, and i want to turn them off.
Messages are something like this one
Quote:

A racially integrated community is a chronological term timed from the
entrance of the first black family to the exit of the last white family.
-- Saul Alinsky
Thanks.

- s1cK -

farslayer 02-04-2008 04:29 PM

it-etch:~# cat /etc/ssh/sshd_config | grep issue
#Banner /etc/issue.net

Edit /etc/issue.net for your message, then uncomment it in the sshd_config file..


although

what you are describing sounds more like fortune , which is a package you can uninstall...

xiao_haozi 02-04-2008 06:04 PM

fortune
 
If this is just the same message everytime you login... it sounds like it is from MOTD (message of the day).
You can see an example here and what file it is and thus how you could alter it:

Code:

Last login: Tue Jan 15 22:49:52 2008 from
Linux 2.6.22.1-UBER.
root@server:~# cat /etc/motd
Linux 2.6.22.1-UBER.

As the last comment said, it could also be fortune if you havce that installed which you could uninstall. If you aren't sure you could see if it is on your system. I would probably try:

Code:

root@server:~# updatedb && locate fortune
My guess is that if you are finding when you log in with SSH that it is your motd. You could change it by editing your /etc/motd file or you could just turn off showing the motd in the sshd_config:

Code:

root@server:~# cat /etc/ssh/sshd_config | grep PrintMotd
#PrintMotd yes

You could just uncomment that and change yes to no so you end up with:

Code:

root@server:~# cat /etc/ssh/sshd_config | grep PrintMotd
PrintMotd no

Hope that helps out! Shocked that such a message would even show up in any motd or fortune...that is why my guess would be an motd.

Mr. Bond 02-05-2008 05:59 AM

Yup it is Fortune!

1. Uninstall Fortune with pkgtool
2. Remove bsd-games-login-fortune.sh from /etc/profile.d/

I just did that and everything works fine :)

dive 02-05-2008 06:35 AM

Thats ok if you have root access. If not you will have to ask admin to uninstall it.


All times are GMT -5. The time now is 03:09 PM.