LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2016, 02:57 AM   #1
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Rep: Reputation: 15
How to run command in remote desktop


Currently I do this:
####################

I connect to a Remote Desktop Windows Machine(Windows 7) from my Windows 7 Machine using Admin/<password>


Then I open putty to connect to a Linux box from inside Remote Desktop machine.

Then I run a command in putty console.


What I want to do :
#######################
I have downloaded MobaXTerm FREE edition Emulator in windows.

Is there any way so that I could connect to Linux box and run the same command sitting at my windows machine ?
 
Old 01-27-2016, 03:07 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,124

Rep: Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271
looks like you need to set up a tunnel using putty - if I understood it well.
 
Old 01-27-2016, 03:35 AM   #3
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pan64 View Post
looks like you need to set up a tunnel using putty - if I understood it well.
yes.

Could you please provide some steps how to achieve this objective ?
 
Old 01-27-2016, 03:50 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,124

Rep: Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271
http://www.ehow.com/how_2036605_create-ssh-putty.html
http://realprogrammers.com/how_to/se...ith_putty.html
https://howto.ccs.neu.edu/howto/wind...ng-with-putty/

I think that is quite simple. Just choose a port like 7777 on your remote windows and port forward it to your linux box, port 22.
Next you can try to ssh from your local terminal to your remote windows box using port 7777 (if the linux box was unreachable directly).
 
Old 01-27-2016, 04:38 AM   #5
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pan64 View Post
http://www.ehow.com/how_2036605_create-ssh-putty.html
http://realprogrammers.com/how_to/se...ith_putty.html
https://howto.ccs.neu.edu/howto/wind...ng-with-putty/


Next you can try to ssh from your local terminal to your remote windows box using port 7777 (if the linux box was unreachable directly).

>>>ssh from your local terminal to your remote windows box using port 7777

What IP you'll write in Host field of putty ? IP of the remote windows box ?

( linux box is unreachable directly ).
 
Old 01-27-2016, 07:17 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,124

Rep: Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271
just look at the 3rd link I gave, the destination should be the linux box. There is no host field.
 
Old 01-27-2016, 07:33 AM   #7
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pan64 View Post
just look at the 3rd link I gave, the destination should be the linux box. There is no host field.
Please look at this comment ..

>>>ssh from your local terminal to your remote windows box


ssh would require a IP here....right ? Shall I use IP of the remote windows box ?

Last edited by Volcano; 01-27-2016 at 07:35 AM.
 
Old 01-27-2016, 10:58 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Possibly, it depends on how and where you set up the tunnel. You haven't provided any information on how you set up the tunnel, so it's impossible for us to tell you how to use it.

pan64 suggested you first set up a tunnel from the remote Windows machine to the Linux machine. If you do that, then you'd ssh from your local Windows machine to the remote Windows machine using the port you set up for the tunnel.

There are other ways of going about this though. SSH tunnels are very flexible and powerful, you can use them in many different ways to accomplish a certain goal.

Last edited by suicidaleggroll; 01-27-2016 at 11:01 AM.
 
Old 01-27-2016, 03:54 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,948

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
The way I understand the question is that the OP wants to login into the linux PC through the remote windows PC without using remote desktop.

Since the tunneling process is through the server not the client setting up putty for tunneling will not help. Along the same lines you could install the windows open ssh server and tunnel through. I don't know if the windows version can remote log in similar to doing it via linux.
 
Old 01-28-2016, 04:50 AM   #10
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by suicidaleggroll View Post

pan64 suggested you first set up a tunnel from the remote Windows machine to the Linux machine. If you do that, then you'd ssh from your local Windows machine to the remote Windows machine using the port you set up for the tunnel.
correct.

my query here is :

How do you ssh from your local Windows machine to the remote Windows machine ? Could you please tell this part.
 
Old 01-28-2016, 05:12 AM   #11
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,124

Rep: Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271
that is explained in the user's manual of your MobaXTerm.
 
Old 01-28-2016, 07:35 AM   #12
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pan64 View Post
that is explained in the user's manual of your MobaXTerm.
Here is the command I am thinking ....

This is my Moba console:



[##################] ~
[XXXXXXXXXXXXXXXX] ssh user@<Shall_It _be_ IP_of_remote_windows_box> -p 7777

user is windows login id to remote_windows machine.

(provided I have 7777 port forward in remote_windows_box )

Last edited by Volcano; 01-28-2016 at 07:37 AM.
 
Old 01-28-2016, 08:29 AM   #13
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,124

Rep: Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271Reputation: 2271
user/pw are the user and pw on the linux box
ssh user@<remote_windows> -p 7777
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How do I run a remote Linux desktop in Windows? LXer Syndicated Linux News 0 02-25-2010 09:41 PM
[SOLVED] Run Remote Command tronayne Slackware 12 10-11-2009 07:40 AM
KDE Remote Desktop wont run rax369 Linux - Software 1 12-29-2008 07:50 PM
run command on remote server ust Linux - Newbie 1 09-09-2008 09:10 AM
How to run Graphical commands in remote Desktop. rktech83 Linux - Networking 7 03-09-2006 08:11 AM


All times are GMT -5. The time now is 02:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration