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 04-18-2013, 03:08 PM   #1
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 657
Blog Entries: 2

Rep: Reputation: 60
Where to start with SSH for a newbie? remote control of a PC in France (from Germany)


Hello,
I will give a Lubuntu Dell Optiplex to a person in France. This person has NO GLUE with PC. Its why I would like to make all updates, programm install etc. from my PC in germany (first from my netbook with GPRS; later from my desktop in the local house net; ALL PCs are with linux).
This purely for private purpose and the person in France know I will have a remote access. So, no hiding of the remote access, everything should be simple especially for the person in France.
So far, I understood, I should use SSH.
a) implement it on both PCs
c) make parameters for having it working
After few searching of how to implement SSH, I'm a bit lost and feel like at the bottom of the mountain.
So, if you have few advice where to start?
I will give that PC on Mai 12. So, I should speed up..
Thanks.
 
Old 04-18-2013, 03:57 PM   #2
DaPh00z
LQ Newbie
 
Registered: May 2011
Posts: 6

Rep: Reputation: Disabled
First question, do you want to have SSH server running all the time on the gift computer, or have an easy way for the person to turn it on for you to do maintenance and then it will be off again when they reboot. If they will be connected to the internet directly, this might be the safer option security-wise.

Either way, the first step is to install the ssh server on the gift computer. It should look something like:
Code:
sudo apt-get install sshd

Last edited by DaPh00z; 04-18-2013 at 04:07 PM.
 
Old 04-18-2013, 04:28 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,556
Blog Entries: 2

Rep: Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553
1. Network connection: Has the person in France a static IP or (more common) a dynamic IP? In the latter case you will have to use a service like DynDNS or No-IP to be able to connect to the system. Also, if the person in France connects to the net using a router you will have to configure port-forwarding in the router, so that you can access the machine.
2. The SSH server: To be most secure after installing the SSH server (installation instructions of course dependent on the distro you choose) you should disable root login, password-based authentication and enable and setup key-based authentication.

If you need help with that please ask more specific questions and give us some more information about the network connection and the distro you want to use on the gift computer.
 
Old 04-21-2013, 02:30 PM   #4
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 657
Blog Entries: 2

Original Poster
Rep: Reputation: 60
Quote:
Originally Posted by TobiSGD View Post
1. Network connection: Has the person in France a static IP or (more common) a dynamic IP? In the latter case you will have to use a service like DynDNS or No-IP to be able to connect to the system. Also, if the person in France connects to the net using a router you will have to configure port-forwarding in the router, so that you can access the machine.
2. The SSH server: To be most secure after installing the SSH server (installation instructions of course dependent on the distro you choose) you should disable root login, password-based authentication and enable and setup key-based authentication.

If you need help with that please ask more specific questions and give us some more information about the network connection and the distro you want to use on the gift computer.
1. I dont know. The PC will be simply attached to a home router from France Telecom or similar provider. So, I thing this is NOT a server and a post-forwarding in the router is not necessary?
2. The SSH server is the PC of France? So, I will install. Its with lubuntu 12.10 (dell optiplex; see the first line of dmesg below).

Code:
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.5.0-27-generic (buildd@akateko) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #46-Ubuntu SMP Mon Mar 25 20:00:05 UTC 2013 (Ubuntu 3.5.0-27.46-generic 3.5.7.7)
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   NSC Geode by NSC
[    0.000000]   Cyrix CyrixInstead
[    0.000000]   Centaur CentaurHauls
[    0.000000]   Transmeta GenuineTMx86
[    0.000000]   Transmeta TransmetaCPU
[    0.000000]   UMC UMC UMC UMC
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f686bff] usable
[    0.000000] BIOS-e820: [mem 0x000000001f686c00-0x000000001f688bff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000001f688c00-0x000000001f68abff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000001f68ac00-0x000000001fffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fed003ff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed20000-0x00000000fed9ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000feefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffffffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.3 present.
[    0.000000] DMI: Dell Inc.                 OptiPlex GX280               /0G8310, BIOS A04 02/09/2005
[    0.000000] e820: update [mem 0x00000000-0x0000ffff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] e820: last_pfn = 0x1f686 max_arch_pfn = 0x1000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CBFFF write-protect
[    0.000000]   CC000-EFFFF uncachable
[    0.000000]   F0000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask FE0000000 write-back
[    0.000000]   1 base 01F800000 mask FFF800000 uncachable
[    0.000000]   2 base 01F700000 mask FFFF00000 uncachable
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] original variable MTRRs
[    0.000000] reg 0, base: 0GB, range: 512MB, type WB
[    0.000000] reg 1, base: 504MB, range: 8MB, type UC
[    0.000000] reg 2, base: 503MB, range: 1MB, type UC
[    0.000000] total RAM covered: 503M
[    0.000000] Found optimal setting for mtrr clean up
[    0.000000]  gran_size: 64K 	chunk_size: 16M 	num_reg: 3  	lose cover RAM: 0G
[    0.000000] New variable MTRRs...
 
Old 04-21-2013, 03:33 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,556
Blog Entries: 2

Rep: Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553
Quote:
Originally Posted by floppy_stuttgart View Post
1. I dont know. The PC will be simply attached to a home router from France Telecom or similar provider. So, I thing this is NOT a server and a post-forwarding in the router is not necessary?
It is a server, in the sense that you will run a SSH server on it to be able to connect to it. Since the person is connected through a router you will have to configure port-forwarding in that router and assuming that this is a usual DSL connection it will most likely work with a dynamic IP, so that you have to use a dynamic DNS service, like DynDNS or No-IP.
 
Old 04-21-2013, 06:19 PM   #6
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: SolydX
Posts: 399

Rep: Reputation: 82
If the person knows how to get his IP address, it may not be necessary to have a static IP. IP addresses over DSL/cable do not change very often, if ever. Mine stays the same for months unless I force it to renew the lease. You will likely have to have port forwarding configured in the router in order for SSH to work, this is not something that would typically be on by default.

Last edited by guyonearth; 04-21-2013 at 06:20 PM.
 
Old 04-21-2013, 06:25 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,556
Blog Entries: 2

Rep: Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553
Quote:
Originally Posted by guyonearth View Post
IP addresses over DSL/cable do not change very often, if ever.
Here in Germany DSL providers change the IP of DSL connections every 24 hours.
 
Old 04-21-2013, 06:34 PM   #8
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: SolydX
Posts: 399

Rep: Reputation: 82
Quote:
Originally Posted by TobiSGD View Post
Here in Germany DSL providers change the IP of DSL connections every 24 hours.
Really? How strange. I wonder why they do that? My IP has been the same for the last month.
 
Old 04-21-2013, 07:26 PM   #9
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,968

Rep: Reputation: 1084Reputation: 1084Reputation: 1084Reputation: 1084Reputation: 1084Reputation: 1084Reputation: 1084Reputation: 1084
I would suggest that the the gift computer be set up with a cron job that automatically tries to connect to your computer and set up a reverse ssh tunnel. This way there is no problem with having to set up port forwarding rules on the remote router to which the gift computer is connected.
The cron job on the gift computer would need to run with root privileges as connection through privileged ports is required.
Your home PC would need to be listening for the connection and your home router would need to be set to forward incoming SSH requests to your home PC.
For some scripting ideas, I found this useful. http://www.brandonhutchinson.com/ssh_tunnelling.html
 
Old 04-21-2013, 08:00 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,462

Rep: Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119Reputation: 2119
The remote user can use whatsmyip.com to check his current external ip, then just tell you what it says..
 
Old 04-22-2013, 04:39 AM   #11
kyr0
LQ Newbie
 
Registered: Jun 2011
Distribution: Debian
Posts: 27

Rep: Reputation: 14
You could always use a Dynamic DNS service that updates the ip address to match a non-changing hostname via a commandline tool or cron job.

http://www.changeip.com is one of those services. (for free)

K.
 
Old 04-23-2013, 03:13 PM   #12
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 657
Blog Entries: 2

Original Poster
Rep: Reputation: 60
Quote:
Originally Posted by chrism01 View Post
The remote user can use whatsmyip.com to check his current external ip, then just tell you what it says..
Interesting.
So, the person in france
- switch the PC on
- find the IP out with firefox and whatsmyip.com
- start SSH with which programm/GUI?
- call me, give me the IP by phone and
- then I can log in (with putty or remmina)
correct?
(the other posts are good: but I must read them again in order to understand)
 
Old 04-23-2013, 03:31 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,556
Blog Entries: 2

Rep: Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553Reputation: 4553
Quote:
Originally Posted by floppy_stuttgart View Post
Interesting.
So, the person in france
- switch the PC on
- find the IP out with firefox and whatsmyip.com
Correct.
Quote:
- start SSH with which programm/GUI?
None. The SSH daemon is a server process that usually starts anytime you start the OS. There is no need to explicitly start it.
Quote:
- call me, give me the IP by phone and
Correct.
Quote:
- then I can log in (with putty or remmina)
Partially correct. You can also use the command-line, using the ssh command. Also, keep in mind that, if using this approach, you still need to configure port forwarding in the router that is connected to the PC in France.
 
Old 04-01-2014, 03:20 AM   #14
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 657
Blog Entries: 2

Original Poster
Rep: Reputation: 60
TEAMVIEWER installed, used, tested.. is working. Topic closed.
 
  


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
remote control, X over SSH RWBlue01 Linux - Server 7 08-16-2009 04:05 PM
remote control through ssh sycamorex Linux - General 10 11-23-2008 04:26 PM
LXer: Mozilla Corporation Collaborating with eBay in France, Germany and the UK LXer Syndicated Linux News 0 04-01-2007 01:47 AM
LXer: Germany and France split on Google-beater LXer Syndicated Linux News 0 01-02-2007 06:54 PM
I support Germany and France GtkUser General 23 06-09-2003 12:48 PM


All times are GMT -5. The time now is 08:11 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