LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-16-2021, 04:03 AM   #16
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553

Quote:
Originally Posted by andrewysk View Post
man, the invalid attempt to login into ssh server is not stopping.. keeps logging new failed attempt.
Between 10,000 and 20,000 attempts per day on a couple of my web servers. About 5,000 a day on servers that don't host anything. So, yeah, it's totally normal for a public facing server.
 
1 members found this post helpful.
Old 08-16-2021, 04:22 AM   #17
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724
Quote:
Originally Posted by TenTenths View Post
Between 10,000 and 20,000 attempts per day on a couple of my web servers. About 5,000 a day on servers that don't host anything. So, yeah, it's totally normal for a public facing server.
Just to add another anecdote to indicate the scale of the annoyance, I just spot checked one and it has over 22k invalid user attacks against SSH during just the last 6 hours.
 
Old 08-16-2021, 08:40 PM   #18
Trihexagonal
Member
 
Registered: Jul 2017
Posts: 362
Blog Entries: 1

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by andrewysk View Post
I am trying to play around with remote server..
The place to "play around" with it is your LAN.

Where only you have access to that machine until you understand the Services you have enabled and how exploits of those Services carried out.
(You learn how it's done and try to hack yourself.)

Quote:
Originally Posted by ondoho View Post
And some users will always be alarmed by it, thinking they're actually getting hacked (and not thinking: my system does the right thing here).
Tech's in charge of reviewing abuse reports used to have a name for people who were fixated on firewall logs and constantly reported false alarms.

Goomers With A Firewall.
 
Old 08-23-2021, 09:10 AM   #19
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
The quirks of containerised software installation, with internet access - rather a different topic.
Let's concentrate on SSH for now.
I believe Turbocapitalist gave you some good pointers.
Another link: https://wiki.archlinux.org/title/OpenSSH and https://wiki.archlinux.org/title/SSH_keys
I am a bit confused now. Is OPENSSH equal to the ssh in my laptop ? or they are 2 different software ? I can't figure it out. Initially i thought they are the same, after that i thought they are different.. then when i did some browsing.. i think they are the exact samething..
 
Old 08-23-2021, 09:14 AM   #20
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Just to add another anecdote to indicate the scale of the annoyance, I just spot checked one and it has over 22k invalid user attacks against SSH during just the last 6 hours.
LOL

You must have "gold bars" stored in the vault of your server .lol
 
Old 08-23-2021, 10:09 AM   #21
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724Reputation: 3724
Quote:
Originally Posted by andrewysk View Post
I am a bit confused now. Is OPENSSH equal to the ssh in my laptop ? or they are 2 different software ? I can't figure it out. Initially i thought they are the same, after that i thought they are different.. then when i did some browsing.. i think they are the exact samething..
Strictly speaking, SSH is the protocol. There are several suites of software which support the SSH protocol: OpenSSH, Teleport, Tectia, Dropbear, etc. In principle they should all be able to connect to each other since they all claim to use the same standard protocol. OpenSSH is the suite used on pretty much any GNU/Linux distro out there today.

However, any of those suites provide both a client and a server because the style of architecture the SSH protocol is built around is "client-server". And loosely speaking, SSH can refer to either the SSH client or the SSH server in informal speech depending on context. The client is the software which provides the interface you or your scripts interact with and which connects you to the server on the remote system. That's what's on your laptop if you are connecting from it. The server provides the software which waits over on the system you connect to and listens for and processes incoming SSH connections. That's what's getting pounded on as bots try to jiggle the doorknob so to speak. It's only going to let in those authorized to get in but that does not stop the bots from trying. As mentioned, turning off password authentication, after setting up keys or certificates, will scare off most of the bots.

Last edited by Turbocapitalist; 08-23-2021 at 10:10 AM.
 
1 members found this post helpful.
Old 08-23-2021, 12:05 PM   #22
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Strictly speaking, SSH is the protocol. There are several suites of software which support the SSH protocol: OpenSSH, Teleport, Tectia, Dropbear, etc. In principle they should all be able to connect to each other since they all claim to use the same standard protocol. OpenSSH is the suite used on pretty much any GNU/Linux distro out there today.

However, any of those suites provide both a client and a server because the style of architecture the SSH protocol is built around is "client-server". And loosely speaking, SSH can refer to either the SSH client or the SSH server in informal speech depending on context. The client is the software which provides the interface you or your scripts interact with and which connects you to the server on the remote system. That's what's on your laptop if you are connecting from it. The server provides the software which waits over on the system you connect to and listens for and processes incoming SSH connections. That's what's getting pounded on as bots try to jiggle the doorknob so to speak. It's only going to let in those authorized to get in but that does not stop the bots from trying. As mentioned, turning off password authentication, after setting up keys or certificates, will scare off most of the bots.
So, you said any ssh server in theory can communicate with any ssh client..

Hee hee, i think the bots are trying to "jiggle" the door, is because i didn't totally disable password authentication. I have 2 account to ssh server, 1 is using ssh key, the other still using password.. . I was learning the ssh key stuff.. i leave myself a backdoor in case i screwed up the ssh key or something.. .. No yet learn how to use fail2ban....
 
Old 08-23-2021, 01:19 PM   #23
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,653

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
Quote:
Originally Posted by andrewysk View Post
So, you said any ssh server in theory can communicate with any ssh client..

Hee hee, i think the bots are trying to "jiggle" the door, is because i didn't totally disable password authentication. I have 2 account to ssh server, 1 is using ssh key, the other still using password.. . I was learning the ssh key stuff.. i leave myself a backdoor in case i screwed up the ssh key or something.. .. No yet learn how to use fail2ban....
An you might not need fail2ban (as much as I love it) if you restrict your ssh protocol traffic to your local subnet. They cannot break in using ssh, if they cannot connect to any ssh server.

As a sysadmin, I have used server security, network security, application security, and protocol security. For large and legal issues there is no step to trivial to take (because of what is at stake), but for a home network it seems best to use the most simple and easy solution to eliminate the problem.
 
Old 08-23-2021, 01:43 PM   #24
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
An you might not need fail2ban (as much as I love it) if you restrict your ssh protocol traffic to your local subnet. They cannot break in using ssh, if they cannot connect to any ssh server.

As a sysadmin, I have used server security, network security, application security, and protocol security. For large and legal issues there is no step to trivial to take (because of what is at stake), but for a home network it seems best to use the most simple and easy solution to eliminate the problem.
Thanks for the advice.
As much as i trying to grasp what you mean, i still can't get it all.
I think you meant put the ssh server in my own local network .. so the bots won't be able to "jiggle the door of " ssh.
I have not reach to that level yet.. i rented a server on digital ocean to try it, so it is public facing , and can't be place behind my local subnet.
 
Old 08-23-2021, 02:36 PM   #25
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,653

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
Quote:
Originally Posted by andrewysk View Post
Thanks for the advice.
As much as i trying to grasp what you mean, i still can't get it all.
I think you meant put the ssh server in my own local network .. so the bots won't be able to "jiggle the door of " ssh.
I have not reach to that level yet.. i rented a server on digital ocean to try it, so it is public facing , and can't be place behind my local subnet.
Are you only going to access that server from home? If you have a fixed address, you can set it to only allow ssh from your address. If your address is variable (set using DHCP by your ISP) but in a fixes range, you can allow only that range. This restriction can be set in a firewall or using networking stack features (TCP wrapper), or the "Allow Users" setting (in the sshd server conf file) which can restrict by user name and source address or source subnet. Check your man pages or run a quick search. It is not secret information. ;-)
 
Old 08-24-2021, 01:25 AM   #26
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by andrewysk View Post
Thanks for the advice.
As much as i trying to grasp what you mean, i still can't get it all.
I think you meant put the ssh server in my own local network .. so the bots won't be able to "jiggle the door of " ssh.
I have not reach to that level yet.. i rented a server on digital ocean to try it, so it is public facing , and can't be place behind my local subnet.
I know this is not the answer you want to hear, but being so clueless (as you yourself admit) means you shouldn't be running a public-facing server at all.

You are endangering the whole internet, not only yourself - if someone manages to break in there, deposit and activate some malware.
 
Old 08-24-2021, 02:16 PM   #27
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
I know this is not the answer you want to hear, but being so clueless (as you yourself admit) means you shouldn't be running a public-facing server at all.

You are endangering the whole internet, not only yourself - if someone manages to break in there, deposit and activate some malware.
If someone manage to break in.. can i still take over the server back ? i mean, can i delete the whole server project from digital ocean web interface ?
should be able right ?
I have to dive into to get some experience start from somewhere.. ..

Last edited by andrewysk; 08-24-2021 at 02:17 PM.
 
Old 08-25-2021, 12:46 AM   #28
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by andrewysk View Post
If someone manage to break in.. can i still take over the server back ? i mean, can i delete the whole server project from digital ocean web interface ?
should be able right ?
Yes, but the bigger question is: will you even notice?
I see you're busy reading log files, but you aren't able to separate the harmless entries from the potentially harmful ones.
You simply might not recognize the signs - keep in mind, a succesful hacker doesn't want you to notice. They want to keep on using your computer for as long as possible.

Quote:
Originally Posted by andrewysk View Post
I have to dive into to get some experience start from somewhere.. ..
You can do that locally, in your own LAN, or even create one with a virtual machine that you log into from your bare metal install.
 
  


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
ext4 journaling process constantly accessing hard drive - does not go into sleep mode retiem Linux - General 7 12-17-2020 04:34 AM
[SOLVED] Other machine CANNOT SSH into it but the machine CAN ssh into other machines. monag Linux - Networking 4 05-22-2013 07:26 AM
[SOLVED] CPU constantly 50% also pcmanfm constantly respawning. linuxpicaxe Linux - Software 2 09-11-2012 04:45 PM
[SOLVED] Adding a new user to Solaris 9 so that this user can ssh into the server rcforster Solaris / OpenSolaris 2 03-14-2011 06:10 AM
squirremail ...it says invalid user or invalid password. rnj Fedora 9 10-25-2004 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:27 PM.

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