SCP/SFTP giving "Can't connect to remote machine" when launched from the ssh applet
search cancel

SCP/SFTP giving "Can't connect to remote machine" when launched from the ssh applet

book

Article ID: 392146

calendar_today

Updated On:

Products

CA Privileged Access Manager (PAM)

Issue/Introduction

One of the functionalities of the SSH Mindterm applet in PAM is to launch an SCP/SFTP access  while having a session established to a given UNIX/Linux machine

There are some situations in which this does not work. The present case discusses a situation where the SCP/SFTP fails to open and a generic error "Error connecting to remote host" is displayed:

There may be multiple causes for such a behaviour. The present article discusses one of them.

Cause

While checking the secure log under /var/log of the remote machine (or an equivalent log where security events are stored) the following error may show up at the time of the connection attempt:

Mar 10 05:21:55 <machine_namw> sshd[650100]: error: no more sessions

This error generally means that the number of sessions, as per the MaxSessions parameter inside /etc/ssh/sshd_config of the endpoint to which we are connected, is too low and that the number of sshd sessions has been exceeded, whereby no new sessions and in particular the session spawned by initiating the SCP/SFTP process from inside a connected session, can be created.

Resolution

Please check parameter MaxSessions inside /etc/ssh/sshd_config to make sure it is enough. MaxSessions is by default 10, if not configured otherwise

Once the parameter has been modified, restarting of sshd is required 

Additional Information