I want to connect to a server with SSH (a Debian installation in a VMware image). On that server I want to call gitk
a repository viewer for git
. What do I need to do to make this work?
Asked
Active
Viewed 1.7k times
7
![](../../users/profiles/1519.webp)
Peter Stuifzand
- 730
- 2
- 8
- 10
3 Answers
13
To enable X11 forwarding on the server you need at least the xauth
program.
- Install
xbase-clients
on the server (or the package that containsxauth
) Connect to the server with SSH using the following command
ssh -X servername
Run the program
![](../../users/profiles/1519.webp)
Peter Stuifzand
- 730
- 2
- 8
- 10
-
On Debian 10 and Ubuntu 16.04 there is an 'xauth' package which seems to be the only requirement to make X11 forwarding work (you have to disconnect and reconnect to the ssh session after installing it) – a1an May 28 '21 at 13:11
7
Also, check that X11Forwarding
is set to yes in /etc/ssh/sshd_config
(it is apparently the default in Debian).
![](../../users/profiles/2253.webp)
bortzmeyer
- 3,903
- 1
- 20
- 24
1
As an addendum to Peter's correct answer:
If you're using Windows, you can install Cygwin/X to display remote X applications running locally, it's more transparent than remote desktop.
If you just want to execute a shell command remotely, it's "ssh user@hostname command". For even more info, see the man page for the ssh command, or see all the OpenSSH man pages. If you haven't yet used scp or ssh-agent, they will make your life easier.
![](../../users/profiles/3220.webp)
shapr
- 437
- 7
- 12