On Tue, Jan 05, 2021 at 08:11:51PM +0100, Gr??goire Jadi wrote: > Hi, > > When both RemoteCommand and ssh command are provided, the connection > fails with: > > Cannot execute command-line and remote command. > > Though the message is clear, I was puzzled because I couldn't find any > information in the man pages. This patch adds a note in ssh_config(5). >
hi. this feels a bit like overkill: as you've said, the error message is clear. isn;t that hint enough? it doesn;t seem logical to expect that both would work. on the other hand, i suppose in theory the command in the config file could be ignored and the command-line command run, so maybe it does have to be said. still i think what's there is enough. jmc > diff --git usr.bin/ssh/ssh_config.5 usr.bin/ssh/ssh_config.5 > index 1007847662c..fa12092645e 100644 > --- usr.bin/ssh/ssh_config.5 > +++ usr.bin/ssh/ssh_config.5 > @@ -1465,6 +1465,12 @@ Arguments to > accept the tokens described in the > .Sx TOKENS > section. > +.Pp > +.Cm RemoteCommand > +is incompatible with > +.Xr ssh 1 > +.Ar command > +argument given on the command line. > .It Cm RemoteForward > Specifies that a TCP port on the remote machine be forwarded over > the secure channel. > > Best, > > -- > gjadi > PGP : AF26 E9C2 A1C8 8D32 A868 4386 1373 5477 2B65 1894 >