SSH Command Execution Hangs, although interactive shell functions fine

前端 未结 7 1620
庸人自扰
庸人自扰 2020-12-29 23:03

When I attempt to execute a command on a remote server with ssh, the ssh command hangs after the exec request accepted debug message, and eventually times out.<

7条回答
  •  感动是毒
    2020-12-29 23:29

    We fixed this by adding adding -n (to redirect std in from /dev/null) and -t (force pseudo-tty allocation)

    Example:

    ssh -t -n user@host command
    

提交回复
热议问题