Operating System - HP-UX
1753528 Members
5084 Online
108795 Solutions
New Discussion

Re: Warning banner from /etc/issue is not displaying via SSH.

 
SOLVED
Go to solution
iPranay
Occasional Contributor

Warning banner from /etc/issue is not displaying via SSH.

Dears 

 

I'm not able to view the contents of /etc/issue file. When login via SSH.

I’ve edited the /etc/inetd.conf as

telnet       stream tcp6 nowait root /usr/lbin/telnetd  telnetd -b /etc/issue

login        stream tcp6 nowait root /usr/lbin/rlogind  rlogind -B /etc/issue

#inetd -c

#restarted the SSH demon

But Banner is not displaying before I login… Please help…

 

 

Regards,

Pranay

4 REPLIES 4
Matti_Kurkela
Honored Contributor
Solution

Re: Warning banner from /etc/issue is not displaying via SSH.

The sshd daemon does not read /etc/inetd.conf at all. The settings you've added will affect incoming logins using the telnet and rlogin protocols only. Local console logins will also display /etc/issue if it exists.

 

You should add this line to the sshd configuration file (usually /opt/ssh/etc/sshd_config):

Banner /etc/issue

 Then restart the sshd daemon.

 

Note: only SSH protocol version 2 can display pre-login banners. Since SSH protocol version 1 is old and has known weaknesses, you should only allow SSH protocol version 2 anyway. So make sure that your sshd configuration file also has this line:

Protocol 2

 

If the Protocol line says "Protocol 2,1" or "Protocol 1,2", change it to "Protocol 2" only.

MK
iPranay
Occasional Contributor

Re: Warning banner from /etc/issue is not displaying via SSH.

Thank you MK... :)


Now it is working when i changed the Protocol 2 only :) :)

Regards,
Pranay
iPranay
Occasional Contributor

Re: Warning banner from /etc/issue is not displaying via SSH.

Dear MK,

 

In few servers i'm not able to get the warning banner after doing the configuration. What could be the reason?

 

regards,

Pranay

Matti_Kurkela
Honored Contributor

Re: Warning banner from /etc/issue is not displaying via SSH.

Did you restart sshd after changing the configuration?

 

My suggestions assumed that you're using a reasonably modern version of the free HP SSH package. If your server is running a commercial SSH package, its configuration file might be elsewhere and might use a different syntax.

 

A very old version of sshd might not support the necessary configuration keywords. In that case, there should be a message in the syslog about sshd detecting an unknown keyword in the configuration.

 

If there is a SSH proxy between you and the actual host (e.g. for logging purposes, or someone is being malicious), then it might be filtering what you actually see.

MK