- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to display hostname when a user tries to login...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:12 PM
01-03-2006 08:12 PM
I want to display hostname when a user tries loggin to a system using ssh.
Please guide me how to achieve that.
I have already put an entry in the /etc/issue
Regards
Santosh Jha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:15 PM
01-03-2006 08:15 PM
Re: How to display hostname when a user tries to login using ssh
You can use, # who -T |awk '{print $9}' will print hostname.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:37 PM
01-03-2006 08:37 PM
Re: How to display hostname when a user tries to login using ssh
I want to put an entry in the /etc/issue
banner `hostname` and i want that the banner of hostname should be displayed when a user tries to loging using ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:44 PM
01-03-2006 08:44 PM
Re: How to display hostname when a user tries to login using ssh
Instead of putting into /etc/issue, try to put in /etc/profile
----/etc/profile----
..................
..................
# Leave defaults in user environment.
trap 1 2 3
banner `hostname`
Save and quit. when you login next time, you will see the banner.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:57 PM
01-03-2006 08:57 PM
Re: How to display hostname when a user tries to login using ssh
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 09:07 PM
01-03-2006 09:07 PM
SolutionCheck /opt/ssh/etc/sshd-config for # no default banner path
#Banner /some/path
You can edit this and put your own. After doing any modification, remember to restart Secure shell daemon.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2006 06:25 PM
01-04-2006 06:25 PM
Re: How to display hostname when a user tries to login using ssh
In /etc/profile,
# Security message fro SSH login
if [ "$SSH_CLIENT" != "" ]
then
echo '$(hostname -a)
cat /etc/issue.ssh
fi
Sample /etc/issue,
This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel...