hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : Web Hosting Tutorials : Creating custom SSH welcome messages
Reply

Web Hosting Tutorials Tutorials related to shared hosting.
Forum Jump

Creating custom SSH welcome messages

Reply Post New Thread In Web Hosting Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-12-2004, 12:28 PM
DediZoneSales DediZoneSales is offline
Disabled
 
Join Date: Jul 2003
Location: England
Posts: 406

Creating custom SSH welcome messages


This is good if you enable ssh login to your users, you can place some text once they login.

*PLEASE INSTALL AT YOUR OWN RISK!

-------------------------------------------------

1. Login to your server as root via SSH.

2. Type: pico /etc/motd

3. Now type in the message you want everyone to see. Something like this is good.

"This computer system is for authorized users only. All activity is logged and regulary checked by systems personal. Individuals using this system without authority or in excess of their authority are subject to having all their services revoked. Any illegal services run by user or attempts to take down this server or its services will be reported to local law enforcement, and said user will be punished to the full extent of the law. Anyone using this system consents to these terms."

(The above is just sample text, you may create your own or use this!)

4. Save & Exit Pico Type: CTRL-X, Y, Enter

Reply With Quote


Sponsored Links
  #2  
Old 12-16-2004, 11:30 AM
Stacie Stacie is offline
Aspiring Evangelist
 
Join Date: Jun 2004
Posts: 372
Re: Creating custom SSH welcome messages

Quote:
Originally posted by Minimalistix
This is good if you enable ssh login to your users, you can place some text once they login.

*PLEASE INSTALL AT YOUR OWN RISK!

-------------------------------------------------

1. Login to your server as root via SSH.

2. Type: pico /etc/motd

3. Now type in the message you want everyone to see. Something like this is good.

"This computer system is for authorized users only. All activity is logged and regulary checked by systems personal. Individuals using this system without authority or in excess of their authority are subject to having all their services revoked. Any illegal services run by user or attempts to take down this server or its services will be reported to local law enforcement, and said user will be punished to the full extent of the law. Anyone using this system consents to these terms."

(The above is just sample text, you may create your own or use this!)

4. Save & Exit Pico Type: CTRL-X, Y, Enter
That probably belongs in a banner not MOTD.

Also you should do echo "update_motd=\"NO\"" >> /etc/rc.conf

Reply With Quote
  #3  
Old 12-29-2004, 09:59 AM
valmark valmark is offline
Junior Guru Wannabe
 
Join Date: Dec 2004
Posts: 83
Re: Re: Creating custom SSH welcome messages

Quote:
Originally posted by Stacie
That probably belongs in a banner not MOTD.

Also you should do echo "update_motd=\"NO\"" >> /etc/rc.conf
Also you shoud edit the /etc/issue to something like this :

Quote:
This computer system is for authorized users only. Individuals using this system without authority or in excess of their authority are subject to having all their activities on this system monitored and recorded or examined by any authorized person, including law enforcement, as system personnel deem appropriate. In the course of monitoring individuals improperly using the system or in the course of system maintenance, the activities of authorized users may also be monitored and recorded. Any material so recorded may be disclosed as appropriate. Anyone using this system consents to these terms.

Reply With Quote
Sponsored Links
  #4  
Old 01-21-2005, 06:21 PM
AstroNyu AstroNyu is offline
Aspiring Evangelist
 
Join Date: Dec 2004
Location: MY, NL, Rest of The World
Posts: 438
nice one. thanks for your nice tut.
and what etc/issue does?

Reply With Quote
  #5  
Old 02-05-2005, 03:42 PM
kalpin kalpin is offline
Junior Guru Wannabe
 
Join Date: Jan 2005
Location: Jakarta, Indonesia
Posts: 86
/etc/issue and /etc/issue.net appear if you nor your user remote to your server via telnet no ssh. If you want to display your messages after they provide their login but before password prompt (via ssh) then you should put it in your sshd_config located at /etc/ssh/sshd_config with line:

banner /etc/warning

But if you want put your messages after you nor your user successfull login to your server then you have to put it at /etc/motd. Unfortunely your users can avoid this if they create an empty .hushlogin in their home (and also will hide their last login).

Reply With Quote
  #6  
Old 02-05-2005, 10:07 PM
UniServe Hosting UniServe Hosting is offline
Disabled
 
Join Date: Dec 2004
Location: Toronto, Ontario, Canada
Posts: 285
PLEASE, PLEASE DO NOT LOGIN in VIA SSH as the user "root". This option should be disabled for the SSH Daemon by default. When are people going to realise that logging in VIA ssh root is like using telnet.

Reply With Quote
  #7  
Old 04-11-2005, 07:33 PM
Lightwave Lightwave is offline
Web Hosting Master
 
Join Date: Apr 2003
Location: San Jose, CA.
Posts: 1,616
Just my 2c... but that explicit of a warning message seems excessive.

Legitimate users are only going to be scared off from using the shell account.

Non-legitimate users won't give a crap anyways. The host/account they are coming from is likely compromised as well.

Reply With Quote
  #8  
Old 04-19-2005, 01:45 AM
rotoiti rotoiti is offline
Junior Guru
 
Join Date: Apr 2005
Location: silicon and earthquakes
Posts: 247
Quote:
Originally posted by UniServe Hosting
PLEASE, PLEASE DO NOT LOGIN in VIA SSH as the user "root". This option should be disabled for the SSH Daemon by default. When are people going to realise that logging in VIA ssh root is like using telnet.
Even when using public key authentication?

Reply With Quote
  #9  
Old 05-04-2005, 10:36 AM
jNive jNive is offline
Design and Hosting Solutions
 
Join Date: May 2005
Location: New York
Posts: 736
log in via another user, and su - as root perhaps

Reply With Quote
  #10  
Old 05-06-2005, 08:56 AM
nadtz nadtz is offline
Web Hosting Guru
 
Join Date: Feb 2005
Posts: 334
Instead of not logging in as root, why not lock down SSH properly. Disabling root is only a bandaid. Most people use such crappy passwords and such worthless security that rooting the box after accessing another acct is childplay.

Logging in as root is nothing like using telnet. Anyone who has ever run a sniffer (for malice or curiosity) can tell you the difference.

Reply With Quote
  #11  
Old 05-06-2005, 10:51 AM
UniServe Hosting UniServe Hosting is offline
Disabled
 
Join Date: Dec 2004
Location: Toronto, Ontario, Canada
Posts: 285
Quote:
Logging in as root is nothing like using telnet. Anyone who has ever run a sniffer (for malice or curiosity) can tell you the difference.
My implication was simply that logging via SSH root is a security hazard/risk. Of course, there are many other determining factors to take into consideration. To cover the scope of hardening any UNIX system is clearly beyond the scope of this thread.

Quote:
Disabling root is only a bandaid.
Sure, it's a bandaid, however, atleast the initial poster is aware that root logins via SSH should be disabled by default. Maybe when you have the time you can write an outlined paper on securing UNIX based systems. I had no intentions on detailing security specifics. The only point I tried to bring across was, root via SSH should be disabled.

Reply With Quote
  #12  
Old 05-06-2005, 11:50 AM
rotoiti rotoiti is offline
Junior Guru
 
Join Date: Apr 2005
Location: silicon and earthquakes
Posts: 247
Quote:
I had no intentions on detailing security specifics. The only point I tried to bring across was, root via SSH should be disabled.
Again, I am trying to understand what kind of security risk I am creating by remotely logging in as root using public key authentication? I understand root login using password (keyboard interactive) auth should be disabled, but what is wrong with public key?

Reply With Quote
  #13  
Old 05-22-2005, 07:46 AM
linux-tech linux-tech is offline
<?require_once("life")?>
 
Join Date: Sep 2002
Location: inside your network
Posts: 9,548
Quote:
Originally posted by UniServe Hosting
PLEASE, PLEASE DO NOT LOGIN in VIA SSH as the user "root". This option should be disabled for the SSH Daemon by default. When are people going to realise that logging in VIA ssh root is like using telnet.
Quote:
logging in VIA ssh root is like using telnet.
Not true at all. SSH is NOT telnet, never will BE telnet, and is flat out MUCH more secure. This analogy is quite ridiculous, and, honestly quite overused. The same can be said for logging in as ANY user over ssh!!

Quote:
This option should be disabled for the SSH Daemon by default.
Incorrect. Like it or not, ssh is MUCH more secure than telnet, and there is absolutely NO reason whatsoever to deny root logins to the server via ssh. Of course, there are numerous individuals who would do nothing more than pull this kind of scare tactic, running around claiming "it's insecure, it's insecure, it's insecure!", when there is absolutely NO proof that it is insecure at all.

Now:
Allowing root access via password isn't a good idea (though it's hardly "insecure"). Requiring dsa keys to login as root will always be the best option.

Disallowing root login only creates more work on an often overworked administrator, and means that specific administrator has to jump through more hoops to get things solved. In a critical situation, this could be incredibly bad.

This is only a "layer" of quasi-security, as weak a layer as changing the ssh port. The fact is that this will not actually STOP much of anything at all, only create MORE work for the systems administrator, and isn't exactly beneficial in this respect.

Now, keeping sessions alive, when users are idle, that's a different story altogether, which is why I tend to get on people who just sit and idle on the server for hours. In fact, I set a default timeout of 5 minutes for idled users.

Reply With Quote
  #14  
Old 05-22-2005, 06:14 PM
mycroftx mycroftx is offline
WHT Addict
 
Join Date: May 2005
Posts: 155
Also if you want that every users will see a different motd, you should modify the /etc/login.conf ( This is only under FreeBSD )
Example:

user:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\

Reply With Quote
  #15  
Old 05-22-2005, 06:26 PM
dzeanah dzeanah is offline
WHT Addict
 
Join Date: May 2005
Posts: 145
I've left root logins via SSH open. Of course, my passphrase in in excess of 20 characters and uses more than just alphanumerics...

The problem is when someone runs a program to try and brute force your SSH password. Don't have a password that's brute-forceable, and you oughta be OK...

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
50f6f69d-b9ac-405a-922c-439645a79962 Listing 2013-03-05 18:25:38
50f6f69c-ff90-4f47-adf6-437845a79962 Listing 2013-03-05 18:25:36
50f6f69c-986c-4b49-8483-438c45a79962 Listing 2013-03-05 18:25:37
50f6f69c-915c-4c7c-bffa-438e45a79962 Listing 2013-03-05 18:25:38
Canadian Web Host 4GoodHosting Launches New Mobile Website Builder Application Web Hosting News 2012-02-02 17:02:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?