Operating System - HP-UX
1752794 Members
5700 Online
108789 Solutions
New Discussion

Re: SFTP installationon HP-UX server

 
mahmo_t
Frequent Visitor

SFTP installationon HP-UX server

Hi,

 

I would like to instal SFTP server on my HPUX server please. I think it was installed previously but somehow stopped working after a power cut down. I am fairly new at this so be patient please :)

9 REPLIES 9
Steven Schweda
Honored Contributor

Re: SFTP installationon HP-UX server

 
mahmo_t
Frequent Visitor

Re: SFTP installationon HP-UX server

Point taken. I have two servers SCP1 and SCP2. I cannot SFTP into SCP2 while SCP1 is fine.

 

While I try and sftp from a client machine into SCP2 I get the following message

Xshell:\> sftp 10.16.2.82     
      
Connecting to host 10.16.2.82:22...     
Could not connect to '10.16.2.82' (port 22): Connection failed.     
      
Type `help' to learn how to use Xshell prompt.     
Xshell:\>  

 

below are the results of ps and like you rightly pointed out evidence that sftp is probably still installed. Can you kindly show me where else I could look please?

 

SCP2 # ps -ef | grep sftp
    root 22358 19702  0 17:26:56 pts/ta    0:00 grep sftp

SCP1 # ps -ef | grep sftp
     scu 26932 26931  0  Jul 17  ?         0:00 csh -c /opt/ssh/libexec/sftp-server
     scu 26933 26932  0  Jul 17  ?         0:00 /opt/ssh/libexec/sftp-server
     scu 15990 15869  0 17:39:05 pts/0     0:00 grep sftp

SCP1 & SCP2 # cd /opt/ssh/libexec
SCP1 & SCP2 #ls
sftp-server      ssh-keysign      ssh-rand-helper

Steven Schweda
Honored Contributor

Re: SFTP installationon HP-UX server

 
mahmo_t
Frequent Visitor

Re: SFTP installationon HP-UX server

 
Matti_Kurkela
Honored Contributor

Re: SFTP installationon HP-UX server

I've understood that Steven Schweda posts his answers as attachments because this community has some issues on the OS platform he uses.

 

SFTP is an extension of the SSH protocol, so a basic SSH connection is a necessary requirement for SFTP.

(It is possible to configure the server to reject non-SFTP connections, but to do that, the server must first accept the connection and check the client's protocol request. The server cannot know if the client wants SFTP or SSH until it has accepted the connection and completed at least a part of the SSH protocol negotiation.)

 

By the netstat listings you posted, both SCP1 and SCP2 hosts seem to have something (most likely a sshd daemon) listening on port 22.

 

What is noteworthy is that you seem to have multiple sockets listening on port 22, with local address specified as "*.22".  Your netstat output also tells me that your SCP1 and SCP2 systems both have multiple IP addresses configured... apparently you have multiple network interfaces, or multiple IP addresses on the same physical interface?

 

Perhaps 10.16.2.82, the IP addres you're testing, was configured on SCP2 after sshd was already started on SCP2. In this case, the sshd daemon might not detect newly configured interfaces until it is restarted.

So you might want to try restarting sshd first. On HP-UX, the name of the sshd start-up script is not necessarily obvious:

sh /sbin/init.d/secsh stop
sh /sbin/init.d/secsh start

 

Unless you have a very old version of SSH, restarting the sshd daemon should be safe: it restarts only the "master" daemon that listens for incoming connections. Any existing SSH connections will not be interrupted.

 

The addresses 10.16.2.81 and 10.16.2.82 do not appear in your netstat snippets at all. Are they really configured to SCP1 and SCP2, or are they just some VPN/NAT/proxy addresses you're using to connect to the actual server? If the latter, the VPN/NAT/proxy/whatever might not be configured to pass through SSH/SFTP connections to SCP2.

MK
mahmo_t
Frequent Visitor

Re: SFTP installationon HP-UX server

Unfortunately when I tried to run the command I get the following error with a root loggin.

 

pwd

/sbin/init.d

./ secsh stop

./: Execute permission denied. 

Dennis Handly
Acclaimed Contributor

Re: SFTP installation HP-UX server

>./ secsh stop

 

This is not what Matti mentioned.

 

Instead of changing directories, just use absolute paths:

/sbin/init.d/secsh stop

/sbin/init.d/secsh start

Steven Schweda
Honored Contributor

Re: SFTP installation HP-UX server

 
mahmo_t
Frequent Visitor

Re: SFTP installation HP-UX server

Thanks Steven, Matti, and Denis for your time taken to help me out. You have all been very helpful.

I think the issue is with the firewalls. I shall work with my colleague now and report back in a weeks time as he is away on holiday.