(defun port-forward-local (ssh-command remote-host remote-port local-port)
(interactive
(list (completing-read "SSH Command: " nil)
(completing-read "Remote Host: " nil)
(completing-read "Remote Port: " nil)
(completing-read "Local Port: " nil)))
(let ((shell-command-buffer-name-async "*Port Forward*"))
(async-shell-command
(format "ssh -L %s:%s:%s %s"
local-port
remote-host
remote-port
ssh-command
))))
ポートフォワード用のコマンドを書いた
所要時間: 約 1分