x11 connection rejected because of wrong authentication.ssh -Y guestthing
You need to enable X11Forwarding in /etc/ssh/sshd_config on your Guest.Both my host and guest are FreeBSD 15 amd64 with bhyve.I had set up the sshd and enabled X11Forwarding in /etc/ssh/ssh_config on guest. But still can't open display. How can I use X forwarding to display guest windows directly on the host?
I had already done this, but not workingYou need to enable X11Forwarding in /etc/ssh/sshd_config on your Guest.
I don't use any manager like vm-bhyveShow me your "vm list"
# uname -v
FreeBSD 16.0-CURRENT main-n283901-0bba277f2223 GENERIC
# vm list
NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE
fbsd15 default bhyveload 2 1024M - No Running (26387)
# uname -v
FreeBSD 15.0-RELEASE-p2 GENERIC
# ifconfig
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=880028<VLAN_MTU,JUMBO_MTU,LINKSTATE,HWSTATS>
ether 58:9c:fc:04:94:0a
inet 10.0.0.208 netmask 0xffffff00 broadcast 10.0.0.255
inet6 fe80::5a9c:fcff:fe04:940a%vtnet0 prefixlen 64 scopeid 0x1
inet6 2601:600:4201:32b0:5a9c:fcff:fe04:940a prefixlen 64 autoconf pltime 263368 vltime 263368
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
I can access guest with ssh.Can you even login from your host OS with ssh to your guest OS?
ssh -Y root@1.1.1.1 /usr/local/bin/xauth file /root/.Xauthority does not exist
/usr/local/bin/xauth (stdin):1: bad display name "unix:10.0" in "remove" command
/usr/local/bin/xauth (stdin):2: bad display name "unix:10.0" in "add" command xclock, X11 connection rejected because of wrong authentication
Error: cant open display: localhost 10.0 PermitRootLogin yes
X11Forwarding yes
X11DisplayOffset 10What you want is called xdmcp, to be able to login directly on a login manager that use Xorg and that support this protocol.Nevermind, I didn't pay attention to this:
"How can I use X forwarding to display guest windows directly on the host?"
I know how to test and run X apps from the guest, but not a complete DE directly from the host without using some remote desktop connection app such vnc or xrdp![]()
Host needs to be running the Xserver. Keep in mind X11 applications are clients, they connect to the Xserver. So in order for X11 applications to run through X forwarding, the host (from where you are runningBut still can't open display.
ssh -X ...) has to have the Xserver for the X11 application to connect to.
ssh -Y root@1.1.1.2 /usr/local/bin/xauth file /root/.Xauthority does not exist
/usr/local/bin/xauth (stdin):1: bad display name "unix:10.0" in "remove" command
/usr/local/bin/xauth (stdin):2: bad display name "unix:10.0" in "add" command X11 connection rejected because of wrong authentication
Error: cant open display: localhost 10.0 PermitRootLogin yes
X11Forwarding yes
X11DisplayOffset 10No, I tried the four arrangement ways. They are the same results.As said in the other thread, does it work with a non-root user?
SorryPlease don't post the same questions in multiple threads. Threads merged.
No idea what you are doing with vm and X11, but:
In the server side, where you have the display:
1) you must run Xorg with the flag "-listen tcp"
2) You must type something like: xhost +
On the client side, where start x clients, you must give the client the name of the display to the x clients, for example to xterm with something like
# env DISPLAY=IP-ofXserver:0.0 xterm
or (not with xenocara)
# xterm -display IP-ofXserver:0.0
You DO NOT need to enable X11Forwarding in /etc/ssh/sshd_config on your Guest.