LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2006, 10:34 PM   #1
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Rep: Reputation: 30
ssh problem


Hi,
Can it be possible to display some messages whenever any user ssh to my computer?? i mean like in redhat linux there is issue.net. so is there any thing for ssh connections also?

Other problem is how can i record users sshing to me in any log file?

Last edited by cranium2004; 03-08-2006 at 10:36 PM.
 
Old 03-08-2006, 11:53 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by cranium2004
Other problem is how can i record users sshing to me in any log file?
This should already be logged in /var/log/auth.log
 
Old 03-08-2006, 11:59 PM   #3
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
In /etc/ssh/sshd_config:
PrintMotd yes
 
Old 03-09-2006, 12:13 AM   #4
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Original Poster
Rep: Reputation: 30
hi haertig,
I search whole system but unable to find any auth.log on my RHEL system. my ls /var/log output is
Quote:
acpid boot.log.2 cron.3 iptraf maillog.3 messages.4 rpmpkgs.2 secure.1 spooler.2 xferlog Xorg.0.log.old
anaconda.log boot.log.3 cron.4 lastlog maillog.4 Pegasus rpmpkgs.3 secure.2 spooler.3 xferlog.1
anaconda.syslog boot.log.4 cups mail messages ppp rpmpkgs.4 secure.3 spooler.4 xferlog.2
anaconda.xlog cron dmesg maillog messages.1 prelink.log samba secure.4 vbox xferlog.3
boot.log cron.1 gdm maillog.1 messages.2 rpmpkgs scrollkeeper.log spooler wtmp xferlog.4
boot.log.1 cron.2 httpd maillog.2 messages.3 rpmpkgs.1 secure spooler.1 wtmp.1 Xorg.0.log
 
Old 03-09-2006, 12:18 AM   #5
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Original Poster
Rep: Reputation: 30
Hi RHELL,
I did In /etc/ssh/sshd_config:
PrintMotd yes
but that only displays Last Login information. how can my message must be displayed whenever anyone ssh to me?? and where can i add that message?
 
Old 03-09-2006, 10:36 AM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by cranium2004
I search whole system but unable to find any auth.log on my RHEL system.
Logging is configurable. I thought auth.log was somewhat universal, but obviously I was wrong. In my /etc/syslog.conf file I have a line like this:
Code:
auth,authpriv.* /var/log/auth.log
This is what directs authorization-type messages to that file I mentioned. You may have something similar. Although on RHEL your syslog configuration file may be somewhere else than /etc/syslog.conf

You could also just grep in /var/log and try to brute force find the correct logfile. Try:
Code:
# grep ssh /var/log/*log
 
Old 03-09-2006, 10:42 AM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You may also have ssh messages logged into some subdirectory under /var/log. For example, my samba messages are logged into /var/log/samba/log.* You'll just have to manually snoop around a little to find what you're looking for. I'm not familiar with the default logging structure of RHEL.
 
Old 03-09-2006, 01:46 PM   #8
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Original Poster
Rep: Reputation: 30
Thanks all
i got the file under /var/log/secure but what abt message to display for users connecting thru' ssh to me?
 
Old 03-10-2006, 03:42 PM   #9
cleidh_mor
Member
 
Registered: Mar 2005
Location: Glasgow, Scotland
Distribution: SuSE
Posts: 70

Rep: Reputation: 15
Try putting some text in /etc/motd. This should be displayed each time you login.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 07:56 PM
ssh problem UmneyDurak Fedora 4 04-27-2005 08:02 PM
ssh problem Mystified Linux - Networking 5 01-23-2005 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration