Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I would like to be able to contact my home computer from my laptop while on the road. Then I would like to be able to check my email (using the email client on my home system), check stocks, bank stuff, etc. Naturally, I want all this to be on a secure connection since I would be doing this from a Starbucks or some place like that.
My laptop runs SUSE 10.2. My home system runs SUSE 10.1, so we are talking Linux to Linux, probably connecting from the laptop to the home system via ssh, and sshd running on the home system.
The home system connects via a wireless router to my router, which is which connects to my internet provider. The home system connects to the router using DHCP, and the router also uses DHCP to connect to my provider. That means that I can't depend on the knowing the IP address when I connect to my router. I plan to set up the router to port forward the ssh port to the home system.
So, question 1: How can I (dynamically) find out my home IP address so I can enter
> ssh me@<host or IP>
I have heard there are service on the web that can do this, but don't know where to look.
2: What do I have to set up in ssh.config and /etc/ssh/ssh_config in order to make the connections, and allow programs on the home system to use the laptops X server?
I would certainly appreciate information that will allow be to find where the documentation to do this stuff is.
You need to forward port 22 on the router to your home desktop. Doing that, it may fix the IP address assigned to the desktop, or use the hostname to re-forward to the new address.
Your router's status page will list the internet address of your router. If you have a router with a built in NAT router port, then you may need to access the routers status page or use "traceroute" to discover it. An always on cable modem may change the IP very rarely. There are dynamic dns services you can subscribe to.
To use X on your laptop, use the command "ssh -X user@host". Also edit /etc/ssh/sshd_config and enable X forwarding.
Also consider changing the port you use from 22 to one above 1024. This will reduce the number of script kiddie attacks. You can change the port number in sshd_config as well. Forward this new port instead of 22 in the router. Then you can either use "ssh -X -p <port #> user@host" or edit the port number in /etc/ssh/ssh_config on your laptop, and /etc/ssh/sshd_config for your desktop.
Also edit sshd_config to only allow protocol 2. Another good idea is to disable root logons and add "AllowUsers <Your User Name>". Root logons are a bad idea. It is a known user and a popular target of attackers. The "AllowUsers" entry will only allow logins from the users listed.
Also note that if your username is different on the two computers, when on the laptop, the user you logon as should be the desktop username not the laptops.
There are manpages for both sshd_config and ssh_config.
I forgot that you should run "ssh-keygen" on both systems to generate public and private keys. Log in from one computer to the other to add entries to ~/.ssh/known_hosts.
In /etc/ssh/ssh_config, use either the default "ask" or "no" for StrictHostKeyChecking. Make sure it isn't "no". Also check the permissions on your home directory. Make sure that your home directory isn't world writable.
There's a few different things there. You should be able to get your IP address manually from http://www.whatsmyip.org/. Another way is to use someone like http://www.dyndns.com/ for dynamic DNS and install an update client on your home box so that you only need to remember a name, instead of an IP number.
Once you've done that, you can forward port 22 (or whatever port you run SSH on) from your router to your box. At this point you should be able to SSH to your home box.
I run nomachine NX on my home box. On my remote boxes I have the nx client running so I can run firefox, thunderbird or fluxbox, etc. over the connection. There's also freenx but I haven't tried that.