Koozali.org: home of the SME Server

Two concurrent SSH connections

Offline smeerbartje

  • *
  • 71
  • +0/-0
Two concurrent SSH connections
« on: October 22, 2008, 10:38:57 AM »
Hi,

I have a SME server 7.3 installed with remote access allowed from the internet. I also have installed the contrib SME7ADMIN, which is great! However yesterday I received an "alert" which told me that two concurrent SSH connections were opened. Also have a look at the following screenshot. Now my question is: how can I see in the logfiles (which file??) what IP address did connect to the server via SSH?


Offline e[nt]e

  • *
  • 172
  • +0/-0
Re: Two concurrent SSH connections
« Reply #1 on: October 22, 2008, 11:17:48 AM »
In the server-manager "View log files" then choose sshd with the appropriate date or shhd/current if it was just yesterday. Then click the "Next" Button in the lower right corner.

JFYI: You will be shown the log files in /var/log/sshd/
1984 wasn't meant to be a manual.

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Two concurrent SSH connections
« Reply #2 on: October 22, 2008, 11:50:24 AM »
just remember that if a user opens 2 instances of a ssh client (for example putty), you've got 2 active connections..

Ciao
Stefano

Offline smeerbartje

  • *
  • 71
  • +0/-0
Re: Two concurrent SSH connections
« Reply #3 on: October 22, 2008, 11:55:58 AM »
just remember that if a user opens 2 instances of a ssh client (for example putty), you've got 2 active connections..

Ciao
Stefano

Indeed, thanks for the replies. I found out it was myself :)

But a lot of people try to connect to my SSH deamon, just by entering random passwords. Is it possible to install a contrib or whatsoever to black a certain IP address for alll incoming traffic? I already found this page, but I would appreciate a new tab in the server manager which enables me to manage blocked IP addresses.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Two concurrent SSH connections
« Reply #4 on: October 22, 2008, 12:30:49 PM »
Hi
That should be another thread (or a search-before-thread)... anyways:
You could switch to key authentication to do login... do not use keys... so if root (and any other account) isn´t allowed to login using passwords, all those random passwords attacks will die at front door.

Search here and howto about how to change to key authentication on ssh.
...

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Two concurrent SSH connections
« Reply #5 on: October 22, 2008, 12:49:59 PM »
denyhosts is what you're looking for
Code: [Select]
yum --enablerepo=smecontribs install smeserver-denyhostsIt will block hosts which fails too many authentications on your ssh server.
« Last Edit: October 22, 2008, 12:57:35 PM by VIP-ire »
C'est la fin du monde !!! :lol:

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Two concurrent SSH connections
« Reply #6 on: October 22, 2008, 12:56:40 PM »
Hi..

if you wish to continue to use password for ssh auth, you could simply change ssh port

ciao
Stefano

P.S. this is not a security improvement, it simply reduce bots' attacks

Offline smeerbartje

  • *
  • 71
  • +0/-0
Re: Two concurrent SSH connections
« Reply #7 on: October 23, 2008, 01:51:17 PM »
I just installed SSH Denyhosts and it's working great! Exactly what I want. I still have one question thouh. Is it possible to remove an ip-address from the blocked list?