Using X11 to forward Kali Linux display to MAC
I loaded a #virtualmachine with #kalilinux. I'm updating my #homelab with a $200 desktop PC (16 GB ram, 256 GB SSD HP). Nice machine running windows 10 w/Hyper-V.
My main desktop is a Mac. I wanted to display Kali desktop using an #XServer instead of inside VM . This allows me to continue learning while displaying on my local workstation vs. within a VM. Some might ask why I didn't load VirtualBox, VMWare player or workstation? These virtualization options can be used to.
My #homelab has a VMware stand-alone (esxi 5.5) as well. I tried loading the VMware image posted on the download site. I tried #virtualbox as well on my Mac and had issues. I wasn't successful while I didn't dig into it too much. I plan on having VM's loaded on the ESXi host for pen testing and scan activities.
Hope this helps.
On your MAC, Download, Install Xquartz ( https://www.xquartz.org )
Download - Kali Installer - I used Hyper-V
Load as a VM used Hyper-V with an external switch on Windows 10. The external switch in Hyper-V allows VM's to bind to physical network vs. NAT.
You can use: VMware, Hyper-V or VirtualBox (or vmware fusion)
#Enable a couple settings
sudo vi /etc/ssh/ssh_config
Change
Host *
# ForwardAgent no
ForwardX11 yes
ForwardX11Trusted yes
Enable SSH
sudo systemctl enable ssh
Start SSH
sudo systemctl start ssh
Reboot for good measure (to test SSH auto-start)
sudo reboot
Start Terminal on MAC
ssh -XY ss@192.168.0.13
xfce4-session
This was displayed on my mac terminal
$ ssh -XY ss@192.168.0.13
ss@192.168.0.13's password:
Recommended by LinkedIn
Linux kali 5.10.0-kali3-amd64 #1 SMP Debian 5.10.13-1kali1 (2021-02-08) x86_64
The programs included with the Kali GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Last login: Sat Apr 24 20:23:19 2021 from 192.168.2.105
┏━(Message from Kali developers
┃ We have kept /usr/bin/python pointing to Python 2 for backwards
┃ compatibility. Learn how to change this and avoid this message:
┃ ⇒ https://www.kali.org/docs/general-use/python3-transition/
┗━(Run “touch ~/.hushlogin” to hide this message)
┌──(ss㉿kali)-[~]
└─$ xfce4-session
/usr/bin/iceauth: creating new authority file /run/user/1000/ICEauthority
gpg-agent: a gpg-agent is already running - not starting a new o ne
(xfwm4:742): xfwm4-WARNING **: 20:24:10.622: The display does not support the XComposite extension.
(xfwm4:742): xfwm4-WARNING **: 20:24:10.640: Compositing manager disabled.
(xfwm4:742): xfwm4-WARNING **: 20:24:10.706: Could not find a screen to manage, exiting
xfsettingsd: Another clipboard manager is already running.
xfsettingsd: No window manager registered on screen 0.
(xfsettingsd:758): xfsettingsd-WARNING **: 20:24:16.664: Failed to get the _NET_NUMBER_OF_DESKTOPS property.
xfce4-panel: No window manager registered on screen 0. To start the panel without this check, run with --disable-wm-check.
Displayed on mac
Updating system
https://www.kali.org/docs/general-use/updating-kali/
kali@kali:~$ sudo apt update
kali@kali:~$ kali@kali:~$ sudo apt full-upgrade -y
Updating
Other sites I used for learning updating Kali Linux
Old post, but I followed this guide recently and it bears noting that: 1) the domain for xquartz you mention is incorrect, that currently leads to a domain for sale page. It's https://www.xquartz.org/ as shown in your screenshot. 2) for forwarding individual applications you need the GUI for rather than the whole desktop, instead of "xfce4-session" run the app with a -G flag once you're in the ssh session, e.g. "burpsuite -G"
Steve your fearlessness when it comes to change and learning new things is an amazing quality. Keep learning and keep sharing! Thank you!
Nice write up, Steve!