How To: Login to your linux box remotely.

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How To: Login to your linux box remotely.

Postby emorrp1 on Thu May 07, 2009 9:16 am

Rationale:
I can no longer be bothered to lug my laptop around with me anymore, and I've also recently moved all my data to an external HDD, so to work properly, I would have to carry that round with me too. I do not (yet) have a spare box that I can just turn into a full-blown server to solve my document access issues. I want to be able to access my computer from anywhere, also I don't need a gui, so this will give you access to your machine as if you had opened a terminal.

However for those who want guis, simply add the "-X" option to each ssh command, forwarding the graphical server and allowing you to launch guis from the command-line, e.g. "mintupload ~/.profile". The disadvantage of this is it's platform dependent, you need to have an X server running on your guest machine, with means either linux, or mac with the server running.

1) install the openssh-server package (you might have to reboot afterwards). AK Dave recommends securing it, but I haven't got around to following his advice yet: viewtopic.php?f=6&t=25416&p=148601&hilit=ssh#p148429
2) if you're lucky enough to have a static IP, you're done: find your IP by right-clicking on the network-manager, selecting connection info. You can now login to your machine using the following command from any remote linux box (look at Putty for windows):
Code: Select all
ssh username@ip.add.re.ss

if like me, not only do you not have a static IP address, but you're also behind a stupid campus firewall that doesn't even allow you to ping your IP address, then it's more complicated:
3) get an account hosted somewhere that you can ssh into. In my case I'm using my department's servers, where we get a free account.
4) setup a "reverse ssh tunnel" from your machine to the server (PORT should be a high numbered, four figures, port on the server, e.g. 1234):
Code: Select all
ssh -NR PORT:localhost:22 server_username@remote-server.com

5) while that program is running, you can first logon to the server:
Code: Select all
ssh server_username@remote-server.com

6) then from there you can logon to your machine:
Code: Select all
ssh -p PORT username@localhost


viola, you can now login from anywhere in world (well, at least anywhere you can get to the server)

EDIT: just noticed this howto for securing the ssh server: viewtopic.php?f=42&t=19183
Last edited by emorrp1 on Wed Jun 10, 2009 11:39 am, edited 2 times in total.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Linux Mint is funded by ads and donations.
 

Re: How To: Login to your linux box remotely.

Postby grimdestripador on Tue May 12, 2009 7:16 pm

I thought I'd get an explanation of how to pass a X11 session through SSH.
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Re: How To: Login to your linux box remotely.

Postby emorrp1 on Wed May 13, 2009 4:53 am

there you go grimdestripador, it's as simple as adding the -X option.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How To: Login to your linux box remotely.

Postby grimdestripador on Tue May 19, 2009 10:09 pm

of all things, I have yet to do this sucessfully.
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Re: How To: Login to your linux box remotely.

Postby emorrp1 on Fri May 22, 2009 6:34 am

hmm, you may be right, I just tried the X forwarding now and it didn't work, anyone have any ideas?
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Login to your linux box remotely - Graphical.

Postby martinson on Fri May 29, 2009 12:11 am

In Kubuntu you can control another Linux computer using two programs called "Krfb" and "Krdc". This provides a graphical link, not only a command line. One of these apps is a the client program (on the computer which can see the other's desktop), and the other is the server program, which is being controlled. The server program is described as being for "Remote desktop sharing".

Perhaps Linux Mint has programs similar to these?
(If not, then ignore this message, and please delete it if you can.)
martinson
Level 1
Level 1
 
Posts: 2
Joined: Thu May 28, 2009 11:03 pm

Re: How To: Login to your linux box remotely.

Postby bolle on Mon Mar 29, 2010 4:25 pm

Can i do this on an ipod touch jailbroken with a terminal app on it?
Thanks
bolle
Level 3
Level 3
 
Posts: 134
Joined: Sat Jul 25, 2009 8:53 pm

Re: How To: Login to your linux box remotely.

Postby emorrp1 on Mon Mar 29, 2010 6:56 pm

Most of the hard part is on the host system end, you should be able to connect to it using any device that can run an ssh client program (you probably need to install openssh according to many google results)
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How To: Login to your linux box remotely.

Postby jessewilliams on Mon May 31, 2010 3:58 am

Brilliant! Thanks for the heads up mate! It never crossed my mind that this was a piece of cake to be do! Followed your steps with no sweat and got it done immediately. Thank for the info! More Power!
jessewilliams
Level 1
Level 1
 
Posts: 5
Joined: Wed May 26, 2010 10:54 am

Re: How To: Login to your linux box remotely.

Postby emorrp1 on Mon May 31, 2010 9:57 am

Glad I could help, JesseWilliams, though I should probably update this how-to with what I now know about dyndns.org - an amazing site that effectively gives you a free domain tied to your non-fixed IP, allowing you to be done after step 2! It also gets around the issue of having to know in advance you're going to need access.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: How To: Login to your linux box remotely.

Postby ibm450 on Mon May 31, 2010 10:20 am

Team viewer, easy to use, has linux version also, free and works fast
Image
Asus UL50VT laptop ~ LM10 - Unity 12.04 - Win 7
Image
User avatar
ibm450
Level 5
Level 5
 
Posts: 604
Joined: Sun Jan 11, 2009 6:56 am
Location: Kwinana, Western Australia

Re: How To: Login to your linux box remotely.

Postby DrHu on Mon May 31, 2010 3:02 pm

No machine NX is also worth a look
http://linuxgazette.net/135/knaggs.html
User avatar
DrHu
Level 16
Level 16
 
Posts: 6694
Joined: Wed Jun 17, 2009 8:20 pm

Re: How To: Login to your linux box remotely.

Postby designwebs on Sat Jul 24, 2010 9:08 am

I like to use teamviewer myself.
designwebs
Level 1
Level 1
 
Posts: 4
Joined: Thu Jul 22, 2010 2:55 pm

Re: How To: Login to your linux box remotely.

Postby paulc on Sat Jul 24, 2010 10:04 am

ssh is the best & easiest way, and safest.
$ ssh username@IP_ADDRESS
I would for sure block telnet & ftp as insecure. scp, putty, winscp, ssh, the best & safest way to get back & forth.
paulc
Level 1
Level 1
 
Posts: 19
Joined: Thu Jul 22, 2010 7:35 pm

Re: How To: Login to your linux box remotely.

Postby Pierre on Mon Jan 03, 2011 5:39 am

Team viewer, easy to use, has linux version also, free and works fast


+1.
Image
User avatar
Pierre
Level 6
Level 6
 
Posts: 1327
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: How To: Login to your linux box remotely.

Postby wagonlips on Fri Nov 18, 2011 4:07 am

I find that if I reboot my machine remotely I am effectively locked out. None of the services, such as ssh, start up until I physically login. How can I rectify this?

Linux Mint 11 Katya (GNU/Linux 2.6.38-8-generic x86_64)
wagonlips
Level 1
Level 1
 
Posts: 2
Joined: Fri Nov 18, 2011 4:00 am

Re: How To: Login to your linux box remotely.

Postby electroaudio on Thu Dec 01, 2011 5:33 pm

emorrp1 wrote:However for those who want guis, simply add the "-X" option to each ssh command, forwarding the graphical server and allowing you to launch guis from the command-line, e.g. "mintupload ~/.profile". The disadvantage of this is it's platform dependent, you need to have an X server running on your guest machine, with means either linux, or mac with the server running.



There is a x-win server for windows too called x-ming http://sourceforge.net/projects/xming/
Xming works just as well as a normal xserver for both for the terminal and for graphical programs, but...
electroaudio
Level 1
Level 1
 
Posts: 14
Joined: Sun Nov 27, 2011 6:09 pm

Linux Mint is funded by ads and donations.
 

Return to Tutorials / Howtos

Who is online

Users browsing this forum: SteveSi and 6 guests