Solved

ssh connection

Posted on 2004-09-19
9
1,217 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
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:jdw_2004
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 2

Expert Comment

by:jdw_2004
Comment Utility
Just to check all bases, can you ping the freebsd box from the Mac?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 38

Expert Comment

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

Author Comment

by:pkalima
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Many thanks!!
I went and modified Norton's firewall to allow ssh outbound connection to specific host, and it worked!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now