Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-02-2008, 08:12 AM
|
#1
|
Member
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524
Rep:
|
How to have a log for sshd?
Hi!
I run FC as a server and would like to have a log for my sshd. How may I do this?
thanks
|
|
|
06-02-2008, 08:21 AM
|
#2
|
Member
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511
Rep:
|
ssh is normaly logged by default.
Check the /etc/ssh/sshd_conf file for more info.
|
|
|
06-02-2008, 01:58 PM
|
#3
|
Member
Registered: Sep 2004
Location: Pennsylvania
Distribution: Gentoo, Suse, Fedora, Slackware
Posts: 56
Rep:
|
In Fedora, /var/log/secure contains the sshd log. It will tell you who tried to log in, whether they succeeded, etc..
|
|
|
06-02-2008, 03:08 PM
|
#4
|
LQ Newbie
Registered: May 2004
Location: sol 3 (3rd planet from sun)
Distribution: Redhat 9.0
Posts: 8
Rep:
|
last also contains a list of successful and failed login attempts via ssh (as well as Desktop).
>last -f /var/log/btmp
lastb is a short cut for the above command.
To list by ip address:
lastb -i or
last -i -f /var/log/btmp
This output is easier to scan for failed login attempts.
To stop hacking via ssh try denyhost, works great.
|
|
|
06-03-2008, 05:37 AM
|
#5
|
Member
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524
Original Poster
Rep:
|
Quote:
Originally Posted by Ajax4Hire
last also contains a list of successful and failed login attempts via ssh (as well as Desktop).
>last -f /var/log/btmp
lastb is a short cut for the above command.
To list by ip address:
lastb -i or
last -i -f /var/log/btmp
This output is easier to scan for failed login attempts.
To stop hacking via ssh try denyhost, works great.
|
really cool commands thanks!
The thing is that I configured iptables in such a way that only a few ips are allowed to login. Only those allowed ips are showed in the logs. But I would like also to see all the other failed attempts which have been blocked through the firewall. Ok, now that I'm writing this, it becomes me clear that I'm looking in the wrong log files! Where should I look to find those failed login attempts? Where are the iptables'log files?
thanks
Last edited by xpucto; 06-03-2008 at 05:39 AM.
|
|
|
All times are GMT -5. The time now is 12:17 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|