From 31b664ccd8228fc075e88a0f2db7608feca60d67 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Thu, 21 Jun 2018 07:21:47 +0200 Subject: [PATCH] ssh: add -J and -A flags (#2148) --- pages/common/ssh.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pages/common/ssh.md b/pages/common/ssh.md index 4b8890e377..a69a37ceca 100644 --- a/pages/common/ssh.md +++ b/pages/common/ssh.md @@ -23,10 +23,14 @@ `ssh -D {{9999}} -C {{username}}@{{remote_host}}` -- SSH tunneling: Forward a specific port (localhost:9999 to slashdot.org:80): +- SSH tunneling: Forward a specific port (localhost:9999 to slashdot.org:80) along with disabling pseudo-[t]ty allocation and executio[n] of remote commands: -`ssh -L {{9999}}:slashdot.org:80 {{username}}@{{remote_host}}` +`ssh -L {{9999}}:{{slashdot.org}}:{{80}} -N -T {{username}}@{{remote_host}}` -- Enable the option to forward the authentication information to the remote machine (see `man ssh_config` for available options): +- SSH jumping: Connect through a jumphost to a remote server (Multiple jump hops may be specified separated by comma characters): -`ssh -o "ForwardAgent=yes" {{username}}@{{remote_host}}` +`ssh -J {{username}}@{{jump_host}} {{username}}@{{remote_host}}` + +- Agent forwarding: Forward the authentication information to the remote machine (see `man ssh_config` for available options): + +`ssh -A {{username}}@{{remote_host}}`