Options

RDP to Linux from Windows and vice versa

TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
So I'm trying to build my lab and have 2 physical machines with 2 full OSes. So far I have, one machine running Windows 8 and the other machine is running Kali Linux. Both machines are on the same LAN and can ping each other no problem. They are also on the same Workgroup. I've installed Remmina Remote Desktop Client on the Linux box. Windows 8 has RDP enabled and tested RDP to other Windows machines as I use it to remote to work. However I cannot remote to the Linux box from the Windows box and vice versa.
A. Trying to remote from the Linux box the connection times out, receiving error message "Failed to start up SSH session: Timeout connecting to x.x.x.x

B. Trying to remote from the Windows box to Linux, I receive the "Remote desktop can't connect to the remote computer for one of these reasons. 1. Remote access to the server is not enabled. 2 The remote computer is turned off. 3 The remote computer is not available of the network. Make sure the remote computer is turned on and connected to the network and that the remote access is enabled"

I have Desktop sharing enabled on the Kali box. The computer is turned on and the computer is on the network. Could not find any relevant information on Google or on the Kali Linux forums or at least something similar to my situation. What am I doing wrong? I know it's possible because people are doing it for sure. Do I need to enable anything? Do I need to install anything else? I understand they use 2 different protocols but I thought Remmina was suppose to solve the issue.

By the way, the reason I am doing this is because my space is very limited to have 2 keyboards, mice, and everything else on the same desk, not to mention it would annoy me if I was to use 2 keyboards anytime i wanted to do something. Instead I want to be able to remote to and from each machine and just use one keyboard, mouse, etc.

Comments

  • Options
    ChickenNuggetzChickenNuggetz Member Posts: 284
    If both boxes (and screens) are on the same desk, just use Synergy. It'll allow you to use one mouse and keyboard across multiple operating systems, no manual switching required. I've used this for years and works great. Do note, however, that both boxes need to be on the same subnet for best results.

    Synergy: Synergy - Mouse and keyboard sharing software

    Outside of that, it sounds like it could be either a firewall or SELinux issue.
    :study: Currently Reading: Red Hat Certified Systems Administrator and Engineer by Ashgar Ghori

    Certifications: CCENT; CCNA: R&S; Security+

    Next up: RHCSA
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    Both boxes and screens are on the same desk at the moment. Eventually though, the Linux box will only have power and internet connection and the windows box will have the dual screen setup. This why I wanted to be able to remote to the Linux box. Synergy is a paid software, I'm looking for something towards the free price range.
  • Options
    ChickenNuggetzChickenNuggetz Member Posts: 284
    Well, the paid software bit is new; I've never had to pay before. Makes sense though, it's a great program and probably worth the money for long term set-ups.

    If the Linux box is going headless, again, I'd verify firewall/SELinux settings.
    :study: Currently Reading: Red Hat Certified Systems Administrator and Engineer by Ashgar Ghori

    Certifications: CCENT; CCNA: R&S; Security+

    Next up: RHCSA
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    Well, the paid software bit is new; I've never had to pay before. Makes sense though, it's a great program and probably worth the money for long term set-ups.

    If the Linux box is going headless, again, I'd verify firewall/SELinux settings.

    Remmina did not work, so I tried a different tool, XRDP. Downloaded and installed the software, checked the services and I guess by default it is disabled. Started the XRDP service on Kali, went back to my Windows machine, entered the IP address of Linux box and voila! Connection was made and was prompted with the XRDP login prompt. Entered the Linux box credentials and I am able to remote in. I spend 3 hours yesterday trying to figure out with Remmina was not working, today spend 10 minutes configuring XRDP and the damn thing worked!
  • Options
    ChickenNuggetzChickenNuggetz Member Posts: 284
    Glad to hear you got it working! :)
    :study: Currently Reading: Red Hat Certified Systems Administrator and Engineer by Ashgar Ghori

    Certifications: CCENT; CCNA: R&S; Security+

    Next up: RHCSA
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    Glad to hear you got it working! :)

    Well I guess I spoke too soon, nothing is easy I guess. Did some more testing, shut down and restarted both the machines and my fears were confirmed. Since xrdp needs to be restarted on every reboot, I have to restart it manually every time. In order to do that I have to have a monitor connected to it. I guess now I have to figure out how to enable/run the XRDP service on first boot up.
  • Options
    seigexseigex Member Posts: 105
    TheFORCE wrote: »
    Well I guess I spoke too soon, nothing is easy I guess. Did some more testing, shut down and restarted both the machines and my fears were confirmed. Since xrdp needs to be restarted on every reboot, I have to restart it manually every time. In order to do that I have to have a monitor connected to it. I guess now I have to figure out how to enable/run the XRDP service on first boot up.

    I've never used xRDP before, so I'm shooting from the hip, but how are you starting it now? if it's using the service command (service xrdpd start or something like that) then you should be able to do something like 'update-rc.d xrdpd enable' from a root prompt to have it start on boot.

    EDIT: Just double checked, you can do 'update-rc.d xrdp.sh defaults' to enable from boot.
  • Options
    wd40wd40 Member Posts: 1,017 ■■■■□□□□□□
    I will follow this thread as I have the same setup.

    Windows 8 on PC with 2 monitors.
    Kali on an older PC, I connected it to my secondary monitor (it has 2 inputs) when I need to check Kali I switch input so that I have 1 monitor for each PC.

    I am using wireless keyboard / mouse for each of them so shuffling / storing keyboards and mice is not an issue.
  • Options
    ChickenNuggetzChickenNuggetz Member Posts: 284
    TheFORCE wrote: »
    Well I guess I spoke too soon, nothing is easy I guess. Did some more testing, shut down and restarted both the machines and my fears were confirmed. Since xrdp needs to be restarted on every reboot, I have to restart it manually every time. In order to do that I have to have a monitor connected to it. I guess now I have to figure out how to enable/run the XRDP service on first boot up.

    You should be able to configure XRDP services to start on boot, I believe by default it doesnt do this.

    EDIT: Just read seigex's comment and he is correct, update-rc.d xrdp.sh defaults will add the XRDP script to the system run commands at boot.
    :study: Currently Reading: Red Hat Certified Systems Administrator and Engineer by Ashgar Ghori

    Certifications: CCENT; CCNA: R&S; Security+

    Next up: RHCSA
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    seigex wrote: »
    I've never used xRDP before, so I'm shooting from the hip, but how are you starting it now? if it's using the service command (service xrdpd start or something like that) then you should be able to do something like 'update-rc.d xrdpd enable' from a root prompt to have it start on boot.

    EDIT: Just double checked, you can do 'update-rc.d xrdp.sh defaults' to enable from boot.

    Yes you are correct. To start it manually I was doing a "service xrdp start" from the command prompt. The other easier way is to add the command on the Startup menu options, and this works like a charm. It eliminates the manual start of the service and I can still remote in while I'm already logged in to the linux box. I just removed the screen connected to the linux box and I'm typing blindly in order to first log in to linux and then rdp to it from the windows machine.
    Now the next step is to be able to rdp to the linux box without having to login to kali first. In the windows world you can rdp to a windows machine even when someone is not physically logged in to it. This is the last obstacle at this point and this will also eliminate the keyboard from the linux box leaving it only with power and Internet connection.
    Any suggestions on how to work around this issue?
  • Options
    seigexseigex Member Posts: 105
    TheFORCE wrote: »
    Yes you are correct. To start it manually I was doing a "service xrdp start" from the command prompt. The other easier way is to add the command on the Startup menu options, and this works like a charm. It eliminates the manual start of the service and I can still remote in while I'm already logged in to the linux box. I just removed the screen connected to the linux box and I'm typing blindly in order to first log in to linux and then rdp to it from the windows machine.
    Now the next step is to be able to rdp to the linux box without having to login to kali first. In the windows world you can rdp to a windows machine even when someone is not physically logged in to it. This is the last obstacle at this point and this will also eliminate the keyboard from the linux box leaving it only with power and Internet connection.
    Any suggestions on how to work around this issue?

    If you set up the rc.d as mentioned above, then the service should run on boot, not when a user logs in. Is this not the case after you run update-rc.d?
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    seigex wrote: »
    If you set up the rc.d as mentioned above, then the service should run on boot, not when a user logs in. Is this not the case after you run update-rc.d?

    I'm booting up the machine as I type this, for some reason the command is not recognized, along with a bunch of other ones. Will try it now and get back to you.
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    seigex: That works. The issue is resolved. I can now remote in to the linux box from windows with XRDP with no issue without being logged in to Linux first and without having to start the service manually. Now time to play around with it and get other things working.
  • Options
    seigexseigex Member Posts: 105
    TheFORCE wrote: »
    seigex: That works. The issue is resolved. I can now remote in to the linux box from windows with XRDP with no issue without being logged in to Linux first and without having to start the service manually. Now time to play around with it and get other things working.

    Right on
  • Options
    MrAgentMrAgent Member Posts: 1,310 ■■■■■■■■□□
    Just to add, Kali has rdesktop built in. You can try using that as well.
  • Options
    TheFORCETheFORCE Member Posts: 2,297 ■■■■■■■■□□
    MrAgent wrote: »
    Just to add, Kali has rdesktop built in. You can try using that as well.

    I tried rdesktop but it was not working either. Was receiving error message " Error: CredSSP: Initialize failed, do you have correct kerberos tgt initialized? Failed to connect, CredSSP required by server" I was getting that when trying to remote from Kali to Windows.
  • Options
    seigexseigex Member Posts: 105
    Is that trying to remote desktop into a windows box from Kali? You might have to uncheck the Network Level Authentication checkbox on the windows box under Remote Settings in the system advanced settings dialog. This is a requirement to even let XP machines RDP into Windows Vista+.
  • Options
    seigexseigex Member Posts: 105
    Did a little research that verified NLA is the issue, if you still want to keep NLA enabled (which is more secure) then you can get freedrp FreeRDP & FreeRDP | SourceForge.net which supports it.
Sign In or Register to comment.