I am trying to install guacamole on my virtual machine (ubuntu or debian, both failed). And every time I get "connection refused" or "disconnected" when trying to connect to remote Windows (RDP) desktop. I've checked logs and this is what I got:
May 09 19:31:19 deb systemd[1]: Started guacd.service - Guacamole Server.
May 09 19:31:19 deb guacd[28156]: Guacamole proxy daemon (guacd) version 1.5.5 started
May 09 19:31:19 deb guacd[28156]: guacd[28156]: INFO: Guacamole proxy daemon (guacd) version 1.5.5 started
May 09 19:31:19 deb guacd[28156]: guacd[28156]: INFO: Listening on host 127.0.0.1, port 4822
May 09 19:31:19 deb guacd[28156]: Listening on host 127.0.0.1, port 4822
May 09 19:33:18 deb guacd[28156]: Creating new client for protocol "rdp"
May 09 19:33:18 deb guacd[28156]: guacd[28156]: INFO: Creating new client for protocol "rdp"
May 09 19:33:18 deb guacd[28156]: guacd[28156]: INFO: Connection ID is "$8296c3e6-317e-45c3-a13c-5ba555dbca52"
May 09 19:33:18 deb guacd[28156]: Connection ID is "$8296c3e6-317e-45c3-a13c-5ba555dbca52"
May 09 19:33:18 deb guacd[28956]: FreeRDP initialization may fail: The current user's home directory ("/usr/sbin") is not writable, but FreeRDP generally requires a writable home di>
May 09 19:33:18 deb guacd[28956]: guacd[28956]: WARNING: FreeRDP initialization may fail: The current user's home directory ("/usr/sbin") is not writable, but FreeRDP general>
May 09 19:33:18 deb guacd[28956]: Security mode: NLA
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: Security mode: NLA
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: Resize method: none
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: No clipboard line-ending normalization specified. Defaulting to preserving the format of all line endings.
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: User "@a2112378-efd0-4c39-ac9c-19e82d3461b0" joined connection "$8296c3e6-317e-45c3-a13c-5ba555dbca52" (1 users now pres>
May 09 19:33:18 deb guacd[28956]: Resize method: none
May 09 19:33:18 deb guacd[28956]: No clipboard line-ending normalization specified. Defaulting to preserving the format of all line endings.
May 09 19:33:18 deb guacd[28956]: User "@a2112378-efd0-4c39-ac9c-19e82d3461b0" joined connection "$8296c3e6-317e-45c3-a13c-5ba555dbca52" (1 users now present)
May 09 19:33:18 deb guacd[28956]: Loading keymap "base"
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: Loading keymap "base"
May 09 19:33:18 deb guacd[28956]: guacd[28956]: INFO: Loading keymap "en-us-qwerty"
May 09 19:33:18 deb guacd[28956]: Loading keymap "en-us-qwerty"
May 09 19:33:19 deb guacd[28956]: RDP server closed/refused connection: Server refused connection (wrong security type?)
May 09 19:33:19 deb guacd[28956]: guacd[28956]: INFO: RDP server closed/refused connection: Server refused connection (wrong security type?)
May 09 19:33:19 deb guacd[28956]: guacd[28956]: INFO: User "@a2112378-efd0-4c39-ac9c-19e82d3461b0" disconnected (0 users remain)
May 09 19:33:19 deb guacd[28956]: guacd[28956]: INFO: Last user of connection "$8296c3e6-317e-45c3-a13c-5ba555dbca52" disconnected
May 09 19:33:19 deb guacd[28956]: User "@a2112378-efd0-4c39-ac9c-19e82d3461b0" disconnected (0 users remain)
Also I was trying to create ssh connection, but it disconnects me as soon as I enter any login username. Here's logs:
May 09 19:41:09 deb guacd[28156]: guacd[28156]: INFO: Creating new client for protocol "ssh"
May 09 19:41:09 deb guacd[28156]: Connection ID is "$f5688136-5084-43cb-b7d9-625577ffa0d9"
May 09 19:41:09 deb guacd[28156]: guacd[28156]: INFO: Connection ID is "$f5688136-5084-43cb-b7d9-625577ffa0d9"
May 09 19:41:09 deb guacd[29276]: User "@d89fd310-de12-4add-a64b-bb1af0283886" joined connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" (1 users now present)
May 09 19:41:09 deb guacd[29276]: guacd[29276]: INFO: User "@d89fd310-de12-4add-a64b-bb1af0283886" joined connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" (1 users now pres>
May 09 19:41:14 deb guacd[29276]: Unable to connect to any addresses.
May 09 19:41:14 deb guacd[29276]: guacd[29276]: ERROR: Unable to connect to any addresses.
May 09 19:41:14 deb guacd[29276]: User "@d89fd310-de12-4add-a64b-bb1af0283886" disconnected (0 users remain)
May 09 19:41:14 deb guacd[29276]: guacd[29276]: INFO: User "@d89fd310-de12-4add-a64b-bb1af0283886" disconnected (0 users remain)
May 09 19:41:14 deb guacd[29276]: guacd[29276]: INFO: Last user of connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" disconnected
May 09 19:41:14 deb guacd[29276]: Last user of connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" disconnected
May 09 19:41:14 deb guacd[28156]: Connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" removed.
May 09 19:41:14 deb guacd[28156]: guacd[28156]: INFO: Connection "$f5688136-5084-43cb-b7d9-625577ffa0d9" removed.
This time I installed guacamole using: https://github.com/MysticRyuujin/guac-install but I had problems with every installation method I tried (I've tried installing from the official documentation a few times, but I keep getting a 404 when I try to access guacamole).
The software I use for virtual machines: Oracle VM VirtualBox Systems, I use to instal guacamole on: Ubuntu 22.04 and Debian 12.5.0
I've tried so many solutions but none of them helped me to run remote desktop on guacamole. Please note that I am a beginner with this, so I could make some mistakes.
I was having this exact same issue and found this link that helped me fix it:
https://kifarunix.com/install-guacamole-on-debian-11/#fix-rdp-security-negotiation-failed
It has to do with the user running guacd not having access to it's home directory. I know, the error is confusing.
Here is their solution:
Guacamole server (guacd) service runs as user daemon by default.
Create a guacd system user account which can be used to run guacd instead of running as daemon user.
sudo useradd -M -d /var/lib/guacd/ -r -s /sbin/nologin -c "Guacd User" guacd
sudo mkdir /var/lib/guacd
sudo chown -R guacd: /var/lib/guacd
Next, update the Guacd service user;
sudo sed -i 's/daemon/guacd/' /etc/systemd/system/guacd.service
Reload systemd daemon;
sudo systemctl daemon-reload
Restart Guacd Service;
systemctl restart guacd