Bug#762633: openssh-server: -N option does behave on slave sessions (runs shell when it shouldn't)
Package: openssh-server
Version: 1:6.6p1-7
Severity: normal
Hello
The -N option is documented as 'Do not execute a remote command'. This works
fine but when you run it on an existing master connection (i.e. as slave),
it will actually execute a shell.
To reproduce:
ssh -F /dev/null -o ControlMaster=auto -o ControlPath=socket -f -N localhost
ssh -F /dev/null -o ControlMaster=auto -o ControlPath=socket -N localhost
The first command works as expected, but the second will launch a shell
without prompt in the foreground (try 'ls /' to verify). The same issue
occurs if you run '-f -N' both times (i.e. first command above twice) - it
start a shell and you will see output from the shell such as "uname -a"
before ssh goes into background.
The -N command should not execute a shell. If the master connection exists
already, it should instead behave as '-O forward' ("request forwardings
without command execution") which works correctly.
Regards,
Oskar Liljeblad
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-updates'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages openssh-server depends on:
ii adduser 3.113+nmu3
ii debconf [debconf-2.0] 1.5.53
ii dpkg 1.17.13
ii init-system-helpers 1.21
ii libc6 2.19-11
ii libcomerr2 1.42.12-1
ii libgssapi-krb5-2 1.12.1+dfsg-9
ii libkrb5-3 1.12.1+dfsg-9
ii libpam-modules 1.1.8-3.1
ii libpam-runtime 1.1.8-3.1
ii libpam0g 1.1.8-3.1
ii libselinux1 2.3-2
ii libssl1.0.0 1.0.1i-2
ii libwrap0 7.6.q-25
ii lsb-base 4.1+Debian13
ii openssh-client 1:6.6p1-7
ii openssh-sftp-server 1:6.6p1-7
ii procps 1:3.3.9-7
ii zlib1g 1:1.2.8.dfsg-2
Versions of packages openssh-server recommends:
ii ncurses-term 5.9+20140712-2
ii xauth 1:1.0.9-1
Versions of packages openssh-server suggests:
pn molly-guard <none>
pn monkeysphere <none>
pn rssh <none>
pn ssh-askpass <none>
pn ufw <none>
-- Configuration Files:
/etc/pam.d/sshd changed [not included]
-- debconf information excluded
Reply to: