Operating System - HP-UX
1829596 Members
2185 Online
109992 Solutions
New Discussion

Re: Getting "Connection Refused" message when using sftp

 
SOLVED
Go to solution
Paul Maglinger
Regular Advisor

Re: Getting "Connection Refused" message when using sftp

Yes.
G V R Shankar
Valued Contributor

Re: Getting "Connection Refused" message when using sftp

I am sorry. This is something going out of my control. I need some time to think about it.

Meantime, can you check the route table and /opt/ssh/etc/ssh_config and /opt/ssh/etc/sshd_config of the sco and hpux box.

I am not sure, if this could be the problem.

rename the known_hosts and all other files under $HOME/.ssh/*

then try to do ssh.

I will get back to you.
Steven Schweda
Honored Contributor
Solution

Re: Getting "Connection Refused" message when using sftp

> Okay, I need the help but I really don't
> need the sarcasm.

What sarcasm?

> From the SCO box:
>
> telnet 65.79.165.194 22
> Trying 65.79.165.194...
> Connected to 65.79.165.194.
> Escape character is '^]'.
> SSH-2.0-VShell_2_6_4_448 VShell

Ok. I now believe that there's an SSH (and
hence, probably, SFTP) service available at
65.79.165.194.

> From the HP-UX client:
>
> telnet 65.79.165.194 22
> Trying...
> telnet: Unable to connect to remote host: Connection refused

But it appears to be inaccessible from your
HP-UX system.

> [...] Some clever firewall could do it.

I was serious about that. Perhaps _you_ are
not running a firewall at _your_ end, but the
folks at the other end could be running all
kinds of stuff at their end. (I can't even
reach that address from my system, so it's
clear that there is _some_ kind of access
restriction engaged.)

Have you asked the people in control at the
other end about this problem? Did they say
anything?

Can we assume that your systems have
externally realistic IP addresses, and
they're in direct contact with the external
system? (That is, there's no router doing
NAT/PAT on your end?) If you're in doubt,
you could try to reach my server
(antinode.info) from your various systems,
and I could look at my logs to see where you
appear to be coming from.

Because you _are_ running sshd on your HP-UX
system, you could also try some simple tests
like trying to connect _to_ it by SSH
(similar to but simpler than SFTP) from your
other systems, and from itself. (Or Telnet
to port 22, if you have doubts about your ssh
client program.) It would be comforting to
see your HP-UX system connect to _something_
using SSH. And if that works, it would seem
to shift the blame to the other guys, which
is always a laudable goal.


Back in Fantasyland...

> and try restarting sshd

This might make more sense if you were having
trouble with inbound connections. You could
_kill_ your own server and not affect your
ability to get out.

> I think the connection is getting refused
> because of protocal version. [...]

I don't.

> *(IP address has been sanitized)

We need _more_ mysteries? Is this the same
one you blurted out already?

> I hope you are trying to do sftp or ssh
> using a normal account and not a root
> account.

I'd love to know why that should matter.

> rename the known_hosts and all other files
> [...]

Not how I'd proceed.
Paul Maglinger
Regular Advisor

Re: Getting "Connection Refused" message when using sftp

# sftp antinode.info
Connecting to antinode.info...
ssh: connect to host antinode.info port 22: Connection refused
Connection closed
# ftp antinode.info
Connected to antinode.info.
220- Antinode FTP Server. Please be nice.
220 alp.antinode.info FTP Server (Version 5.4) Ready.
Name (antinode.info:scoper): anonymous
331 Guest login OK, send ident as password.
Password:
230- Using Microsoft Internet Explorer and having problems?
Try using a better FTP client.
Netscape Navigator (V3 or V4) works well.
230 Guest login OK, access restrictions apply.
Remote system type is VMS.
ftp>

> Please be nice.
...
Steven Schweda
Honored Contributor

Re: Getting "Connection Refused" message when using sftp

> # sftp antinode.info
> Connecting to antinode.info...
> ssh: connect to host antinode.info port 22: Connection refused
> Connection closed

Hmmm. No evidence here of an SSH connection
attempt. (Just from some clown in Japan,
203.152.212.246) You might also try plain
ssh instead of sftp (but it shouldn't
matter). Or, again, from your other systems.

The plain FTP did appear (obviously):

23-APR-2009 15:24:03.80 User:anonymous logged in ident:pmXXXXXXer@XXXX.com from
Host:12.XX6.139.150

You're sure that you're not running Bastille
(or something) on that system? Can it talk
(ssh) to itself?
Paul Maglinger
Regular Advisor

Re: Getting "Connection Refused" message when using sftp

Yes, it can talk to itself. I'm beginning to think it may be a VLAN configuration issue. I can connect via psftp to antinode.info from my workstation.
Steven Schweda
Honored Contributor

Re: Getting "Connection Refused" message when using sftp

> Yes, it can talk to itself.

That's a good sign.

> I'm beginning to think it may be a VLAN
> configuration issue.

My psychic powers were too weak to reveal the
existence of a VLAN. The best I could do
was:

> [...] What's _between_ the systems?

and the IP address question cited below.

> I can connect via psftp to antinode.info
> from my workstation.

I see SSH connections from 12.XX6.139.150.
That does seem to be the _only_ IP address in
that neighborhood which I do see, however,
for either FTP or SSH, so if you're coming
from more than one system, then there would
seem to be some kind of fancy network gizmo
between your systems and the outside world.
(Hence my question about your IP addresses
and a "router doing NAT/PAT on your end".)

Blame assignment (always the most important
part of any job) may now be complete.

On my end, for example, antinode.info
(209.98.249.184) is actually a Cisco 678 DSL
modem/router, but it directs the usual
connection attempts to alp.antinode.info
(known locally as 10.0.0.9), as you've seen.
It also, so far as I know, doesn't molest any
outbound traffic, which would seem to
differentiate it from whatever you have
disrupting your outbound traffic.
G V R Shankar
Valued Contributor

Re: Getting "Connection Refused" message when using sftp

Hi Paul,

Is the issue resolved?

Ravi.
Paul Maglinger
Regular Advisor

Re: Getting "Connection Refused" message when using sftp

Issue resolved. I was informed that outbound SSH had been opened up for this server, when in fact it had not.
Steven Schweda
Honored Contributor

Re: Getting "Connection Refused" message when using sftp

Few things amuse me so much as the variation
in the points/value ratio in these forums.
(But I live a dull life.)

Thanks for the report on the resolution,
irregardful.
Paul Maglinger
Regular Advisor

Re: Getting "Connection Refused" message when using sftp

Probably a good thing you're not working for tips...
'nuff said. I appreciate the help from everyone, if not the way it was presented from some.