1
0
Fork 0

enable ssh forwarding

main
Mari 3 years ago
parent 4dbc387ab6
commit b46d683723
  1. 2
      i3/config
  2. 15
      ssh/config
  3. 12
      ssh/rc

@ -249,7 +249,7 @@ assign [class="^jetbrains-.*$"] workspace number $ws4
# start a terminal # start a terminal
assign [class="^st$"] workspace number $ws5 assign [class="^st$"] workspace number $ws5
bindsym $mod+Control+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x' bindsym $mod+Control+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x'
bindsym $mod+Control+Shift+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Gubal)" -e $SHELL -ic 'exec ssh gubal' bindsym $mod+Control+Shift+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Gubal)" -e $SHELL -ic 'exec ssh tmux.gubal'
bindsym $mod+Return workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x' bindsym $mod+Return workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x'
# open a file manager # open a file manager

@ -1,17 +1,22 @@
AddKeysToAgent yes AddKeysToAgent yes
VisualHostKey yes VisualHostKey yes
Host git git.reya.zone gubal gubal.reya.zone *.gubal.reya.zone *.gubal
StrictHostKeyChecking yes
Port 38922
Host gubal gubal.reya.zone *.gubal.reya.zone *.gubal Host gubal gubal.reya.zone *.gubal.reya.zone *.gubal
Hostname gubal.reya.zone
Host tmux.gubal
SendEnv TZ LANG LANGUAGE LC_* SendEnv TZ LANG LANGUAGE LC_*
ForwardAgent yes ForwardAgent yes
StrictHostKeyChecking yes ForwardX11 yes
Hostname gubal.reya.zone ForwardX11Timeout 0
Port 38922 ForwardX11Trusted no
RemoteCommand zsh -ic 'go_tmux -x' RemoteCommand zsh -ic 'go_tmux -x'
RequestTTY yes RequestTTY yes
Host git git.reya.zone Host git git.reya.zone
User git User git
StrictHostKeyChecking yes
Hostname git.reya.zone Hostname git.reya.zone
Port 38922

@ -8,3 +8,15 @@ if [ -n "$SSH_AUTH_SOCK" ]; then
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
fi fi
# example sshrc file
if read proto cookie && [ -n "$DISPLAY" ]; then
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
# X11UseLocalhost=yes
echo add unix:`echo $DISPLAY |
cut -c11-` $proto $cookie
else
# X11UseLocalhost=no
echo add $DISPLAY $proto $cookie
fi | xauth -q -
fi

Loading…
Cancel
Save