Skip to content

Support different user and port with same host #8

@sestegra

Description

@sestegra

On the same server, I'm running 2 SSH servers (one for regular SSH connection (port 22) and another one for container running on the host (port 2222 with admin user)).
My configuration is given below.

.ssh/config

Host *
  ControlMaster auto
  ControlPersist 5m
  ControlPath /tmp/%r@%h:%p

Host server_name
  User user

/tmp

/tmp/admin@server_name:2222
/tmp/user@server_name:22

Result of ssh -O check

$ ssh -O check admin@server_name -p 2222
Master running (pid=75873)
$ ssh -O check server_name
Master running (pid=70100)

Resulting output of cmc -l is incorrect

server_name
   pid: 70100
 start: 5:34PM
status: Master running
socket: /tmp/user@server_name:22

server_name
   pid: 70100
 start: 5:34PM
status: Master running
socket: /tmp/user@server_name:22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions