Operating System - HP-UX
1832609 Members
2477 Online
110043 Solutions
New Discussion

Re: sftp connection closed

 
Fuad_1
Regular Advisor

sftp connection closed

Hi,
One server is currently configured to get files through sftp. The same user is created on the second server, and authorized keys file is copied from the working server, to the new server.

The connection from the remote host is sucessfull, but we get the following error:-

debug1: Exit status 1
Connection closed

Set goals, and work to achieve them
2 REPLIES 2
kemo
Trusted Contributor

Re: sftp connection closed

please clarify by sending the output of

sftp -v user@host
Matti_Kurkela
Honored Contributor

Re: sftp connection closed

The host key of the new server might be unknown to the client. If you're running sftp in batch mode, it cannot present its "the host key is unknown... should we trust it?" question, so the connection will fail even before the authentication step.

The fix is to establish the connection to the new server manually, and accept the host key of the new server. Now the client side will remember the host key and subsequent connection attempts can be done in batch mode.

If that does not solve the problem, then check the syslog of the new server: if the SSH server side has a problem, a clear error message will usually be found there.

If the user has been configured with an invalid shell, it might cause the failure in starting up the sftp-server subsystem for the user.

The debugging message you showed is not very helpful unless we can know exactly what was the last successful step before it.

MK
MK