Remote ssh connection to confD

I’m trying to launch a ssh session to confD from a remote machine. I get a “connection closed by remote host” message. How can I connect to the confD terminal remotely via SSH?

I have ssh configured in confd.conf file as follows

<ssh>
  <enabled>true</enabled>
  <ip>0.0.0.0</ip>
  <port>2024</port>
</ssh>

Command which I used to launch ssh session to confD:
ssh -s -p 2024 admin@ConfD Server IP cli

When you login to the remote machine, can you SSH to ConfD CLI locally?
If you add -vvv to ssh, do you get any additional info?

I get the following info below
I attempted to ssh to confD from local machine using this command below

ssh -vvv -s -p 2024 vamsi@localhost cli

After successful authentication I get this message below

debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to localhost ([127.0.0.1]:2024).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x08
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env LS_COLORS
debug3: Ignored env SSH_CONNECTION
debug3: Ignored env LESSCLOSE
debug3: Ignored env INTELOPENCLSDK
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env DISPLAY
debug3: Ignored env OLDPWD
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env USER
debug3: Ignored env PWD
debug3: Ignored env HOME
debug3: Ignored env SSH_CLIENT
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env SSH_TTY
debug3: Ignored env MAIL
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env SHLVL
debug3: Ignored env LOGNAME
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env PATH
debug3: Ignored env LESSOPEN
debug3: Ignored env _
debug1: Sending subsystem: cli
debug2: channel 0: request subsystem confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 65536 rmax 32768
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)

Connection to localhost closed by remote host.
Transferred: sent 2328, received 2264 bytes, in 0.0 seconds
Bytes per second: sent 2131951.9, received 2073341.5
debug1: Exit status -1

Unless you are using OpenSSH instead of ConfD’s built in ssh server, remove the subsystem cli flag “-s cli” and the connection will not be closed by the ConfD ssh server.

Thanks for the response. I can now ssh to ConfD