Solved

ssh connection

Posted on 2004-09-19
9
1,259 Views
Last Modified: 2013-11-22
I am having trouble connecting TO machine A (FreeBSD 5.2.1) from machine B (Mac OS X) or machine C (WinXP with ssh client). I can connect FROM machine A to machine B and from machine C to machine B.
Machine A has no firewall.
I get the following error message:

Yes Master? ssh 192.168.0.5
ssh: connect to host 192.168.0.5 port 22: Permission denied

Grateful for your help.

pkalima
0
Comment
Question by:pkalima
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:jdw_2004
ID: 12107077
Assuming that this is from your Mac:

Yes Master? ssh 192.168.0.5
ssh: connect to host 192.168.0.5 port 22: Permission denied

Since the circumstances under which connect() can return that error are extremely narrowly defined, that error is probably coming from one of the preliminary calls, which sounds like a client side problem.

What Windows ssh client are you using and what error message does it give?

Are you using passwords to authenticate, or keys?
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12119545
The machine you want to connect to MUST has the secure shell server "sshd" runing (need to
install the secure shell server).

Since the M$ XP PC has only ssh client, there is no way the other boxes can ssh to the PC!
0
 

Author Comment

by:pkalima
ID: 12126901
To jdw:
I used SSH Shell from www.ssh.com, and using password to authenticate. Incidentally, I re-installed freebsd 5.2.1 and was only able to connect using the windows laptop with SSH shell client. However, still unable to connect from mac os x, gives the following error:

Yes Master? ssh -vvv 192.168.0.5
OpenSSH_3.6.1p1+CAN-2004-0175, SSH protocols 1.5/2.0, OpenSSL 0x0090702f
debug1: Reading configuration data /etc/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.5 [192.168.0.5] port 22.
debug1: connect to address 192.168.0.5 port 22: Permission denied
ssh: connect to host 192.168.0.5 port 22: Permission denied
Yes Master?

To yuzh:
Yes, the machine I am trying to connect to is running sshd - confirmed by looking at output from ps -aux.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 2

Expert Comment

by:jdw_2004
ID: 12128233
Just to check all bases, can you ping the freebsd box from the Mac?
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12129514
Do you have fiirwall, IP filter etc to block ssh ? Are they runing the same version of ssh?
0
 

Author Comment

by:pkalima
ID: 12130675
Yes, can ping the FreeBSD box from mac. The mac has a norton's firewall. No firewall on FreeBSD box. I have not yet touched firewalls or IP filters. In fact I put "firewall_enable=yes firewall_type=open" in /etc/rc.conf - still was not able to connect from mac. So have commented out these.
It's odd that I cannot login from mac but can from ssh client on windows.

Incidentally, I get the same message when trying to connect to FreeBSD box swtiched off!! Does this suggest that the fault may be with, in this case, initiating ssh from my mac?
0
 
LVL 2

Expert Comment

by:jdw_2004
ID: 12132111
Yes, the problem is definitely client-side.  I suspect you will find you cannot ssh anywhere.

Do you have the same problem if you are su'd to root on the Mac when you run ssh?

You could try ssh'ing to shell.sf.net if you want a "control" ssh server.
0
 
LVL 2

Accepted Solution

by:
jdw_2004 earned 500 total points
ID: 12132198
I looked on the Symantec website and the Norton Firewall product info contains this ominous statement:

To thwart malicious programs that may send data from your computer without your knowledge, you can now control outbound as well as inbound connections.

I suspect this means you'll need to make a change to the Norton Firewall config to enable this outbound connection.
0
 

Author Comment

by:pkalima
ID: 12135782
Many thanks!!
I went and modified Norton's firewall to allow ssh outbound connection to specific host, and it worked!!
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question