Display logins via SSH


 
Thread Tools Search this Thread
Operating Systems Solaris Display logins via SSH
# 1  
Old 09-12-2011
Display logins via SSH

For work, I need a box to show all logins made recently upon a successful login. Sort of a banner showing previous logins. Not sure how to go about this.
# 2  
Old 09-12-2011
You can add the below command in the .profile file in the user's home directory, hence everytime the user logs in successfully it will print the last login details.
Code:
 
last $LOGNAME | grep ssh

You can also customise the data to be more user friendly as far as understanding the columns is concerned.

Regards,
Vishal
# 3  
Old 09-12-2011
Thank you, that worked pefectly.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Disable multiple ssh logins for an OS user in Solaris

Hi folks, I am fairly a beginner when it comes to Solaris OS administration, but part of my job somehow has scope to provide L1-level of OS administration over a few solaris servers. Now, we have a requirement to limit the number of simultaneous ssh logins/sessions to the server, sort of... (0 Replies)
Discussion started by: engrcha
0 Replies

2. Shell Programming and Scripting

Cisco, 2 ssh logins for expect /bash

HI all i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (0 Replies)
Discussion started by: quintin
0 Replies

3. OS X (Apple)

Mac OS X LDAP client not accepting ssh or console logins (PAM error)

Hi Folks, I've install 389 Directory Server on a Centos 7.0 server. Over the last two days I've been trying to connect a MacBook running 10.10.5 to the server as a client and I'm having only partial success. I've "Joined" to my network Account Server, and set my LDAP Mappings to... (2 Replies)
Discussion started by: jlh
2 Replies

4. Windows & DOS: Issues & Discussions

Fail2ban: email notifications and banning ssh IP logins

Hi all. I am using Cygwin in Windows 7 and am trying to setup fail2ban so that I can ban foreign IP addresses under SSH, also getting email notifications. I downloaded fail2ban and installed it. I then created jail.local copy from jail.conf and changed some values in jail.local. Now when I try to... (2 Replies)
Discussion started by: synthesis
2 Replies

5. Red Hat

Limit root user of SSH logins

Hi team, I tried to modify the /etc/security/limits.conf file to limit the root user for more one login. I added the line in limits.conf file like: @root hard maxlogins 1 I also tried to modify /etc/ssh/sshd_config to limit the root userlogin by adding this: ... (10 Replies)
Discussion started by: leo_ultra_leo
10 Replies

6. UNIX and Linux Applications

pass an xpdf display from red hat server to windows ssh workstation

I have a UniVerse database running on a Red Hat EL3 server. If I am on the server console my software can call xpdf giving the name of a target file and it displays very nicely on the console. I have not been able to figure out how to get the display to happen on any of the Windows XP workstations.... (5 Replies)
Discussion started by: dale kelley
5 Replies

7. UNIX for Dummies Questions & Answers

"Gtk-WARNING cannot open display" from ssh

I am trying to do something on another computer through ssh and I keep getting this:"(gedit:6169): Gtk-WARNING **: cannot open display:"I have googled the interweb and this forum and found many posts but nothing seems to work. I have freshly installed Ubuntu 8.10 with updates on the machine and I... (4 Replies)
Discussion started by: badrabbit6
4 Replies

8. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

9. Linux

Display to PC via ssh/putty (RHE 5)

Hi all, I just installed Red Hat Enterprise and I would like to have the KDE/GNOME windows display to my PC. When I am root (via ssh, putty) I type startx but it fails. I'm not sure what has to be configured! Any help would be greatly appreciated. Thanks! (1 Reply)
Discussion started by: kjbaumann
1 Replies
Login or Register to Ask a Question