LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-01-2011, 11:27 AM   #1
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Rep: Reputation: 15
Problems with SSH and IPtables


Guys.. I have 2 servers..
let say server A and server B

On server A open ssh is configured and is running on port 2298. So from my machine I can login there using ssh on port 2298

but when I login to server B and from there I try to connect to server A I cannot.

ssh: connect to host <ipaddress here> port 2298: Connection refused

can someone please help me?

thanks
 
Old 08-01-2011, 11:29 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

That's because you only have one computer/server configured for ssh. Configure your other server for ssh, and make sure you configure iptables to open the needed port to gain access.

Cheers,

Josh
 
Old 08-02-2011, 05:04 PM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
When I get it right, a login via the usual port 22 succeeded already on machine B. Is there anything in /etc/hosts.allow or /etc/hosts.deny on machine A which would block access for certain addresses? Another file to check could be /etc/ssh/sshd_config whether there are any address limits exposed.
 
  


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
[SOLVED] Iptables vs. SSH cryingthug Linux - Security 5 02-14-2011 07:37 PM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 09:10 AM
SSH and IPTABLES metallica1973 Linux - Security 17 09-05-2005 07:02 PM
iptables and ssh iomari Linux - Networking 6 10-01-2004 07:44 PM
ssh / iptables bruj3w Linux - Networking 17 08-05-2004 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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