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 04-06-2010, 07:00 AM   #1
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Rep: Reputation: 46
sshd_config : ListenAddress not working


Install openssh so that I can access my desktop (192.168.1.100) from my laptop (192.168.1.200) using konqueror with "fish".

Googled and read that the sshd_config should be updated to enhance security.
Tried fiddling with sshd_config on the desktop and hit a brick wall.

Before setting ListenAddress 192.168.1.200 in sshd_config, the laptop can access the desktop with problem.
However, after setting it, the laptop is not able to access the desktop.

Did I understand the setting correctly or is there some bug?
 
Old 04-06-2010, 07:18 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

As I read through your post there's one thing I noticed that I'm not sure if it's a typo or did you really set it like that? The ListenAddress has to be the IP to which you are connecting, so if you want to connect FROM your laptop TO your desktop the ListenAddress has to show the IP of your desktop.

Also restart sshd after changing configuration.

Kind regards,

Eric
 
Old 04-06-2010, 07:49 AM   #3
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
Hi Eric,

hope I can explain a little clearer here :

Desktop (the server) - 192.168.1.100
Laptop (the client) - 192.168.1.200

Connect from laptop to desktop successful.

Edit the file sshd_config of desktop adding:
ListenAddress 192.168.1.200

Restart sshd after changing configuration with /etc/init.d/ssh restart

Connect from laptop to desktop unsuccessful.

Edit the file sshd_config of desktop removing:
ListenAddress 192.168.1.200

Connect from laptop to desktop successful again.


Still trying but same problem
 
Old 04-06-2010, 11:00 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

As mentioned in my previous post, the computer TO which you connect needs its own IP as ListenAddress, so you should put
Code:
ListenAddress 192.168.1.100
in the sshd_config file of the desktop pc and restart ssh server. Then you will be able to connect FROM your laptop (192.168.1.200) to your ssh server on your desktop (192.168.1.100).

The logic behind this is to make the SSH server on the desktop pc listen on this IP (which has to be configured on the desktop) and accept connections on port 22 of that IP/computer.

I hope this makes it a bit clearer.

Kind regards,

Eric
 
Old 04-06-2010, 05:10 PM   #5
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
Hi Eric,

thanks for the patience to explain so clearly.
 
Old 04-06-2010, 06:00 PM   #6
garysteers
LQ Newbie
 
Registered: Apr 2010
Location: In a house
Distribution: Debian/Ubuntu/CentIOS
Posts: 6

Rep: Reputation: 1
Hi Michalng

If you are still concernd about security then you can sure up your sshd config in may ways,

This article can help you do it via groups:
http://www.cyberciti.biz/tips/openss...nd-groups.html

Also, you can stop root being able to login under ssh (you can login as a normal user and either su or sudo to do root type stuff)

PermitRootLogin no

That's the code you would want for that

Hope this helps!
 
  


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
Sshd_config/ maas187 Linux - Security 7 04-21-2009 11:09 PM
sshd_config settings powah Linux - Security 3 06-03-2008 01:59 PM
Cannot edit sshd_config as root LOLobo Linux - Server 3 12-16-2006 02:15 PM
SSH Port-Forwarding via ListenAddress loadedmind Linux - Security 4 05-22-2006 11:02 PM
sshd_config eyt Linux - Newbie 2 02-19-2004 12:05 PM

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

All times are GMT -5. The time now is 03:16 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