How to connect to Windows remote domain from Linux know its gateway hostname?

1

I have credentials to connect to my University's reserved Linux virtual machine which means :

  • username
  • password
  • gateway's hostname let's say secretgateway.net
  • full hostname in .local domain let's say it's myscrethostname.local
  • domain I need to connect to let's say pluto

and some other stuff. How can I connect to this machine (either via RDP or preferably SSH ) from Ubuntu being in a remote network ?

EDIT I have the needed .rdp which I can open in Windows and connect to the machine but when I use Ubuntu's remote desktop connection (Remmina) it tries to connect straight to the hostname.local which I presume won't work.

Patryk

Posted 2014-03-25T21:18:47.873

Reputation: 1 129

What's the FQDN for the machine? Obviously it's not just hostname.local. I assume Windows accounts for the network you're already connecting from to likely complete that. – Daniel Chateau – 2014-03-25T21:58:00.560

I have updated the answer. I know that I have to connect to a windows domain and I can do that with domainjoin-cli from likewise-open5 package but how do I do that since I only know domain name pluto ? – Patryk – 2014-03-25T22:05:47.810

Answers

0

For now I have been able to connect with Remmina on a remote computer not in my LAN doing these steps on two different levels:

a) the remote computer at work (eg Windows):

  1. must be powered on (not in standby or hibernate mode)
  2. with enabled remote desktop option for your user authentication
  3. with firewall enabled for remote assistance and remote desktop on local and public IP
  4. you need to know its public IP, that can change for which you may choose to create/know a relative Dynamic DNS (DDNS). To know your public IP on remote computer, you can launch the following command on the remote computer, that works either on Windows or on Linux:

    nslookup myip.opendns.com resolver1.opendns.com

    on a remote Linux you can also run a script like the following:

    #!/bin/bash myip="$(dig +short myip.opendns.com @resolver1.opendns.com)" echo "${myip}" > ~/Desktop/my_public_ip.txt

  5. if your remote public IP changes, you need to repeat the step 4 to know your new public IP (not necessary if you use a Dynamic DNS) and use it to configure your router at home

  6. I don't know if necessary, but maybe can be necessary open 3389 port also in the remote router: omit this sixth step for now and proceed further

b) your computer at home (eg. Linux):

  1. you need to configure your router, enabling the port 3389 associated with your local IP, by using the protocol TCP
  2. you need to open the port 3389 in the firewall; in Linux, for example, you can run the command: $ sudo firewall-cmd --zone=public --add-port=3389/tcp --permanent
  3. Install Remmina; in Fedora, for example: $ sudo dnf install remmina*
  4. open remmina and setup the remote desktop by using a RDP protocol, indicating the remote public IP with the port (x.x.x.x:3389) as server, your username and password, a domain (like WORKGROUP) if any, set client resolution, depth color to Truecolor 32 bpp, a folder to share if any, and, in advanced tab, good as quality, NLA (Network Level Authentication: for me it worked) or RDP as security. Save and connect, accepting the certificate request

Other tools

To solve the unwanted behavior found by using Remmina (and similar), that redirects the remote user to Windows lock screen, allowing only one user to be logged, you need to avoid RDP protocol.

Here a list of alternative tools:

a) NoMachine or NX that use X11 forwarding through SSH protocol

b) Anydesk

c) UltraVNC

a) NoMachine or NX that use X11 forwarding through SSH

b) Anydesk

c) UltraVNC

Riccardo Volpe

Posted 2014-03-25T21:18:47.873

Reputation: 141