Customized ssh login message

Submitted by aknnn on Sat, 09/29/2018 - 17:59

Sometimes you may wan't to display customized welcome message when logging in to server via ssh.

I'm going to show you how you can do it with CentOS 7.

First open the file /etc/ssh/sshd_config and add this line to it:
PrintMotd no
This will disable the default message printed on login and let's you print your own.

Next you wan't to make your own customized message. This is done by creating a file in the folder named /etc/profile.d
It doesn't matter how you name the file, altought the extension must be .sh
I named mine login_message.sh

First line of this file must be:
#!/bin/bash

In the next line you can add an echo-command and a string to be printed on login:
echo "Welcome to your server"

Save the file and make it executable:
chmod +x login_message.sh

The last thing to do is restart your sshd service:
systemctl restart sshd

Next time you login to your ssh, the newly created message should be shown.

Comments

Submitted by Lewis (not verified) on Mon, 01/21/2019 - 05:53

Permalink

I seriously love your blog.. Excellent colors & theme.

Did you make this amazing site yourself? Please reply back as I'm hoping
to create my own website and want to know where you got this from or what the theme is
named. Thank you!

My page: Judi Jackpot Online

Submitted by Sebastian (not verified) on Tue, 01/22/2019 - 09:44

Permalink

Fascinating blog! Is your theme custom made or did you download it from somewhere?

A theme like yours with a few simple tweeks would really make my blog jump
out. Please let me know where you got your design. With thanks

Also visit my blog; Judi Jackpot Online

Submitted by Elbert (not verified) on Tue, 01/22/2019 - 17:03

Permalink

I blog frequently and I truly appreciate your content. This great article has really
peaked my interest. I'm going to take a note of
your website and keep checking for new information about once per week.
I opted in for your Feed too.

my web page - Judi Jackpot Online

Submitted by Gina (not verified) on Tue, 01/22/2019 - 17:41

Permalink

Hi there, There's no doubt that your web site may be having web browser compatibility problems.
When I take a look at your web site in Safari, it looks fine however when opening in IE, it's got some overlapping
issues. I just wanted to give you a quick
heads up! Apart from that, fantastic blog!

Also visit my web page: Judi Jackpot Online

Submitted by Deanna (not verified) on Tue, 01/22/2019 - 23:32

Permalink

Hmm is anyone else experiencing problems with the
pictures on this blog loading? I'm trying to find out if its
a problem on my end or if it's the blog. Any feed-back would
be greatly appreciated.

Here is my web page - Judi Jackpot Online

Submitted by Kristian (not verified) on Wed, 01/23/2019 - 04:02

Permalink

hello!,I really like your writing very a lot! proportion we be in contact extra about your post on AOL?
I require an expert on this house to solve my problem.
Maybe that is you! Looking forward to see you.

My blog post :: Judi Jackpot Online

Submitted by John (not verified) on Wed, 01/23/2019 - 07:06

Permalink

Do you have a spam issue on this website; I also am a blogger, and I was wanting
to know your situation; many of us have developed some nice practices and we are looking
to trade methods with others, why not shoot me an email if interested.

My webpage: Judi Jackpot Online

Submitted by Federico (not verified) on Wed, 01/23/2019 - 23:44

Permalink

I have been browsing Judi Jackpot Online more than 2 hours today,
yet I never found any interesting article like yours.
It is pretty worth enough for me. Personally, if all webmasters and bloggers made good
content as you did, the internet will be a lot more useful than ever before.

Submitted by Mariano (not verified) on Thu, 01/24/2019 - 02:11

Permalink

Nice weblog right here! Also your website so much up very fast!
What host are you using? Can I get your associate link in your
host? I desire my web site loaded up as quickly as yours lol

Here is my web page: Judi Jackpot Online

Submitted by Lonnie (not verified) on Thu, 01/24/2019 - 14:44

Permalink

Hi there! This article could not be written much better!
Looking through this post reminds me of my previous roommate!
He always kept talking about this. I will forward this article to him.
Pretty sure he's going to have a very good read.

Thanks for sharing!

my web page Judi Jackpot Online

Submitted by Orville (not verified) on Thu, 01/24/2019 - 23:12

Permalink

Hi, I think your site might be having browser compatibility
issues. When I look at your blog in Firefox, it looks fine
but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up! Other then that, excellent blog!

Feel free to surf to my blog post - Judi Jackpot Online

Submitted by Edward (not verified) on Tue, 01/29/2019 - 17:53

Permalink

Good day! This is my first visit to your blog!

We are a collection of volunteers and starting a new initiative in a community in the same niche.

Your blog provided us beneficial information to work on. You have done a wonderful job!

Here is my web site - Judi Jackpot Online

Submitted by Dennis (not verified) on Wed, 01/30/2019 - 09:08

Permalink

Hey there! This is my first visit to your blog! We are a team of volunteers and starting
a new initiative in a community in the same niche.

Your blog provided us beneficial information to work on. You
have done a wonderful job!

Here is my site Judi Jackpot Online

Submitted by Oscar (not verified) on Thu, 01/31/2019 - 01:05

Permalink

Excellent blog you have here but I was curious about if you knew of any community
forums that cover the same topics discussed here?

I'd really like to be a part of Poker Online (Coleman) community where I can get feedback from other knowledgeable individuals that share the same interest.
If you have any recommendations, please let me know.

Cheers!

Add new comment