diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-02-10 06:15:12 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-02-10 17:16:04 +1100 |
commit | 77e05394af21d3f5faa0c09ed3855e4505a5cf9f (patch) | |
tree | 38eb2044afb4a97385418f8272f867ff412917f3 | |
parent | ca613249a00b64b2eea9f52d3834b55c28cf2862 (diff) |
upstream commit
Disable RemoteCommand and RequestTTY in the ssh session
started by scp. sftp is already doing this. From Camden Narzt via github; ok
dtucker
OpenBSD-Commit-ID: 59e2611141c0b2ee579c6866e8eb9d7d8217bc6b
-rw-r--r-- | scp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.194 2017/12/18 17:28:54 millert Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.195 2018/02/10 06:15:12 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -418,6 +418,8 @@ main(int argc, char **argv) | |||
418 | addargs(&args, "-oForwardAgent=no"); | 418 | addargs(&args, "-oForwardAgent=no"); |
419 | addargs(&args, "-oPermitLocalCommand=no"); | 419 | addargs(&args, "-oPermitLocalCommand=no"); |
420 | addargs(&args, "-oClearAllForwardings=yes"); | 420 | addargs(&args, "-oClearAllForwardings=yes"); |
421 | addargs(&args, "-oRemoteCommand=none"); | ||
422 | addargs(&args, "-oRequestTTY=no"); | ||
421 | 423 | ||
422 | fflag = tflag = 0; | 424 | fflag = tflag = 0; |
423 | while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1) | 425 | while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1) |