LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-25-2008, 09:02 AM   #1
CPurnima
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
How to prevent others from remotely logging into my pc through ssh command?


Plz tell me a solution to restrict others(in my network) from logging into my pc using the command: ssh my-ip-address
 
Old 11-25-2008, 09:05 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
They need to type in your password to successfully log in. If they know the password, change it (or add their IPs to your /etc/hosts.deny
 
Old 11-25-2008, 11:26 AM   #3
teknik
Member
 
Registered: Jun 2006
Location: Winnipeg, Canada
Distribution: Slackware 12.1
Posts: 33

Rep: Reputation: 16
or just kill the ssh server..
 
Old 11-25-2008, 12:56 PM   #4
nehaandrew
Member
 
Registered: Nov 2008
Posts: 53

Rep: Reputation: 15
Unless you have given out our password to anyone - you don't have to worry about them logging into your server via SSH using your credentials.

If you don't want anyone to log into your server via SSH - you can ask your server admin to disable the SSH service completely per se.

Linux

Last edited by nehaandrew; 11-30-2008 at 02:13 AM.
 
Old 11-25-2008, 09:41 PM   #5
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
Put SSH on some port other than the default, to minimize brute force attacks.

You can also create or get some crontab script that parses the /var/log/secure* files for repeated break-in attempts and adding those IP's to your /etc/hosts.deny file.

Or get yourself a Router device and use NAT port forwarding to hide your SSH port by means of redirection.

Must be a tough neighbourhood if you are attacked by users from your own network. Maybe even change your password every few days.

Last edited by Tinkster; 10-30-2010 at 06:11 PM.
 
Old 11-26-2008, 01:13 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You should also use the option in the sshd config to disable (remote) root login anyway.
 
Old 11-26-2008, 09:03 AM   #7
CPurnima
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sycamorex View Post
They need to type in your password to successfully log in. If they know the password, change it (or add their IPs to your /etc/hosts.deny
Thank you,,,,
 
Old 11-26-2008, 09:10 AM   #8
python09
LQ Newbie
 
Registered: Nov 2008
Distribution: Ubuntu, Redhat
Posts: 10

Rep: Reputation: 0
You may use public key and private key to login your pc instead of using password , so other people can not login with brute force attack.
Also, you may install the software like fail2ban to block malicious user.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Gateway (not just forwarding) with command logging - can it be done? cejennings_cr Linux - Security 1 10-16-2008 12:09 PM
ssh command logging jcookeman Linux - Security 3 08-26-2008 03:50 AM
from Win XP, remotely execute a command on Linux using ssh lothario Linux - Software 3 06-21-2008 06:59 PM
How to prevent root user from logging into ssh linuxjamil Linux - Server 2 10-08-2007 07:10 PM
Running a shell script remotely via 'ssh <hostname> <command>' davee Linux - General 4 10-09-2005 02:38 AM


All times are GMT -5. The time now is 06:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration