Configure ~/.ssh/config
# Allow Agent forwarding for a specific host (by security)
Host remotehost
ForwardAgent yes
# List existing SSH key in the agent
ssh-add -L
# Add required SSH Key
ssh-add
[user@localmac ~]: ssh user@remotehost
[user@localmac ~]: echo $SSH_AUTH_SOCK
/tmp/ssh-2JfYkZ5O6p/agent.5587
[user@remotehost ~]: ssh user@thirdhost
[user@thirdhost ~]
brew cask install xquartz
Once xquartz is launched, if you launch a new terminal (such as iTerm) instance DISPLAY
should be set in the environment.
[user@localmac ~]: echo $DISPLAY
/private/tmp/com.apple.launchd.drNHsFjcaS/org.macosforge.xquartz:0
[user@localmac ~]: ssh -X user@remoteserver
[user@remoteserver ~]: virt-manager
Configure ~/.ssh/config
# Allow Agent forwarding for a specific host (by security)
Host remotehost
ForwardAgent yes
ForwardX11 yes
[user@localmac ~]: ssh user@remoteserver
[user@remoteserver ~]: echo $DISPLAY
localhost:10.0
[user@remoteserver ~]: virt-manager