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 03-14-2010, 10:40 PM   #1
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Rep: Reputation: 0
SSH connection problems


Hello

I am new to Linux, so I'm still quite the newbie. My problem is that I cannot connect from one server to another by SSH. The situation:

Client server: SSH on standard port 22

Remote server: SSH on non-standard port 2233

Current conditions:
1) I can connect to the remote server from a different client server (a third server that is not listed above) that is also running SSH on port 2233.
2) I can use the remote server to connect to the client server over SSH on port 22
3) I can connect from the client server a different remote server (a fourth server not listed above) that is on port 22

So from testing, it appears that both ingoing and outgoing SSH connections are allowed on both servers, as I have been able to test these for both servers. But when I try the following on the client server:

telnet username@remotehost.com 2233

the connection times out,
and when I try this:

ssh username@www.remotehost.com -p 2233 -vvv

I get the following output:

debug2: ssh_connect: needpriv 0
debug1: Connecting to www.remotehost.com [208.43.23.130] port 2233.
ssh: connect to host www.remotehost.com port 2233: Connection timed out

(note: of course my actual commands use a real username in place of username, and the real host in place of www.remotehost.com)

I'm not sure where I am going wrong here, and the debugging output isn't helping me at all!

Last edited by hakushiro; 03-14-2010 at 10:41 PM.
 
Old 03-14-2010, 10:44 PM   #2
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
hrmm thats strange seeing I can connect to it from here also. have you made any changes to the ssh config file?? and just so i can get this straight and understand for sure.. Server 1 and server 2 can talk to other servers but can't communicate with each other? also please let me know the relationship of server 1 and server 2?

thanks
 
Old 03-14-2010, 10:49 PM   #3
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
remotehost.com is not a real server!! It's just dummy text I put in there

To answer your questions, yes, server 1 and server 2 can both talk to other servers, both incoming and outgoing, but cannot talk to each other. There isn't really a relationship between the two servers - they are completely independent, and not on the same network. I don't know if any changes have been made to the ssh config file.
 
Old 03-14-2010, 10:51 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Do you have iptables and/or SELinux enabled on the machine that you CAN'T connect to?
 
Old 03-14-2010, 10:56 PM   #5
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
I am able to connect to the 208.43.23.130 box, I also agree with Tinkster being given the answer will not enable you to learn. My other suggestion is maybe the other server (NOT 208.43.23.130) is only accecting connections from within a certain subnet? or you have the incorrect port...is this your server? would you be able to PM me (or post) the IP to test with?
 
Old 03-14-2010, 11:03 PM   #6
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
I'm fine with being given help to learn, but I've already been working on this for a few hours, so it's not like I haven't been trying.

HOw would I know if I have iptables and or SELinux enabled? As I say, I am an absolute newbie to linux.
 
Old 03-14-2010, 11:05 PM   #7
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
How do I get the IP address of the client machine?
 
Old 03-14-2010, 11:09 PM   #8
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
try pinging it or even just give me the hostname if it has dns set up
 
Old 03-14-2010, 11:14 PM   #9
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
It's: 66.147.244.187

Thanks for your help by the way
 
Old 03-15-2010, 12:06 AM   #10
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
ok so i can connect to 66.147.244.187:22 and 208.43.23.130:2233 so the only thing that comes from the top of my head is if one of the box's is configured to not talk to you. maybe if you can check to see if iptables is there command iptables -L or check both boxes cat /etc/hosts.allow and cat /etc/hosts.deny and see if there is filtering on sshd: <your IP> on the remote server. **note only check the hosts.allow file if you see sshd: all in the hosts.deny file. let me know i will check in the morning to see how you are doing.
 
Old 03-15-2010, 12:38 AM   #11
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Unfortunately I don't have root access, so I cannot check these things. Is there any other way I can check?
 
Old 03-15-2010, 12:44 AM   #12
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
hehe you just caught me b4 bed...what I would do is check with the sysadmin or someone with better privlages on the remote server, they can check the logs and see whats happening. as i don't really see it being "blocked" granted the fact I can reach it...hrmm... maybe givin it could be dns related, doubtful but maybe try
Code:
ssh <IP ADDRESS> -p[PORT] -l <username>
with out <> and [] of coarse
 
Old 03-15-2010, 02:20 AM   #13
hakushiro
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
I talked to the system admin - that port is blocked. Thank you for your assistance, much appreciated.
 
  


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 connection problems by location DrKranium Linux - Networking 4 08-20-2009 01:54 PM
SSH Connection Problems mac_casey Mandriva 1 10-07-2004 10:55 PM
problems getting remote ssh/X connection working fabs Linux - Newbie 6 03-01-2004 11:24 PM
ssh connection problems polarcat Linux - Networking 3 02-17-2003 12:11 AM
SSH connection problems psodba Linux - Networking 3 08-30-2001 02:37 PM


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