[gull] Truc et astuces: ssh via proxy

Laurent Franceschetti laurent at franceschetti.net
Wed May 2 07:49:50 CEST 2018


Merci du signalement! En tapant man:

>      -J [user@]host[:port]
>              Connect to the target host by first making a ssh connection to the
>              jump host and then establishing a TCP forwarding to the ultimate des-
>              tination from there.  Multiple jump hops may be specified separated by
>              comma characters.  This is a shortcut to specify a ProxyJump configu-
>              ration directive.





> Le 2 mai 2018 à 07:40, felix <felix at f-hauri.ch> a écrit :
> 
> Bonjour,
> 
> Pour joindre avec ssh, une machine distante non accessibles aux reseaux
> auxquels je suis connecté, il faut passer par une machine qui est connecté
> à ladite machine et connecté sur Internet ou un de mes reseaux...
> 
> Quelque chose comme:
> 
> $ ssh -o ProxyCommand='ssh -e none proxyuser at proxyhost nc finaldest 22' user at finaldest
> 
> ou
> 
> $ ssh -f -L 2222:finaldest:22 proxyuser at proxyhost sleep 5 &&
>      ssh -p 2222 -o HostKeyAlias=finaldest -l user localhost
> 
> mais voici la nouvelle option `-J` de ssh:
> 
> $ ssh -J proxyuser at proxyhost user at finaldest
> 
> C'est plus court et plus lisible.
> 
> -- 
> Félix
> _______________________________________________
> gull mailing list
> gull at forum.linux-gull.ch
> http://forum.linux-gull.ch/mailman/listinfo/gull
> 



More information about the gull mailing list