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).

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

Reply via email to