Skip to main content
deleted 15 characters in body
Source Link
Rahul
  • 14k
  • 4
  • 46
  • 56

I have the following SSH-client configuration in my local home directory:

client$ cat ~/.ssh/config 
    Host foo.example.com
    ProxyCommand  /bin/nc 192.168.0.10 2000

This configuration forwards SSH connections to foo.example.com to foo's internal (Docker) SSH service.

It works, but it is a client-side configuration. I need the same setting at server-side. I tried

server$ cat /etc/ssh/sshd_config
...
ForceCommand /bin/nc 192.168.0.10 2000
...

but it doesn't work :(

. Any suggestions? Thank you

I have the following SSH-client configuration in my local home directory:

client$ cat ~/.ssh/config 
    Host foo.example.com
    ProxyCommand  /bin/nc 192.168.0.10 2000

This configuration forwards SSH connections to foo.example.com to foo's internal (Docker) SSH service.

It works, but it is a client-side configuration. I need the same setting at server-side. I tried

server$ cat /etc/ssh/sshd_config
...
ForceCommand /bin/nc 192.168.0.10 2000
...

but it doesn't work :(

Any suggestions? Thank you

I have the following SSH-client configuration in my local home directory:

client$ cat ~/.ssh/config 
    Host foo.example.com
    ProxyCommand  /bin/nc 192.168.0.10 2000

This configuration forwards SSH connections to foo.example.com to foo's internal (Docker) SSH service.

It works, but it is a client-side configuration. I need the same setting at server-side. I tried

server$ cat /etc/ssh/sshd_config
...
ForceCommand /bin/nc 192.168.0.10 2000
...

but it doesn't work. Any suggestions?

Source Link

SSH ProxyCommand server-side

I have the following SSH-client configuration in my local home directory:

client$ cat ~/.ssh/config 
    Host foo.example.com
    ProxyCommand  /bin/nc 192.168.0.10 2000

This configuration forwards SSH connections to foo.example.com to foo's internal (Docker) SSH service.

It works, but it is a client-side configuration. I need the same setting at server-side. I tried

server$ cat /etc/ssh/sshd_config
...
ForceCommand /bin/nc 192.168.0.10 2000
...

but it doesn't work :(

Any suggestions? Thank you