Solved

ssh connection

Posted on 2004-09-19
9
1,244 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

730 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