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.
Hey I've been trying to set up SSHD on my linux box in my house. I have three computers connected to a router that's connected to my cable modem. I've installed OpenSSH, and from a terminal as root I've run sshd, so from my limited understanding of linux I would assume my computer is running SSHD and I should be able to connected to it from other computers in my home.
However, whenever I try connecting using Secure Shell from www.ssh.com, it gives me an error message:
The host 'myIpAddress' is unreachable.
The host may be down, or there may be a problem with the network connection.
Sometimes such problems can also be caused by a misconfigured firewall.
Now I tried disabling both firewalls to make sure that wasn't the problem, and nothing changed, so I figured something was misconfigured. I haven't the slightest Idea what's causing the problem, and I've looked around the internet for a fix unsuccessfully. I read a few things that mentioned something called "port forwarding" but I have no idea what it is or if it ever pertains to my situation, help! thanks.
Port forwarding is something done at the router. According to their site , questions #3, their routers do have port forwarding. I am not to familiar with hawking routers, but you will probably need to get into the router configuration and look for something about port forwarding and forward connection from ssh port 22 to 22 and you might have to assign the ip address of the computer you want it forwarded to. That should open up your router to ssh connections.
Annoyingly not all router mfrs. call it port forwarding. I couldn't find your model with a quick search, so you'll probably have to refer to the manual. What I'd look for is a screen (if you've got a web based interface) or command where you can specify a port number along with an IP address and another port number.
You should set both ports to 22 and the IP to that of the computer you have OpenSSH set up on.
In order to make sure you have OpenSSH set up and running, you can sit at the terminal of your linux machine and telnet to port 22 (use 'telnet localhost 22') if you see the OpenSSH banner something like "SSH-Y.XX-OpenSSH_Z.Z.Z" then you can close telnet, because the server is sending the banner correctly. If you've got another machine on the network, you can similarly try telnet, just change the hostname.
One other note, mandrake provides a command '/sbin/service' which you can use to start & stop daemons (services). So you don't always have to start the server manually. But it is a good idea to when you are just trying to get it to work.
I'm not positive about this, but your router shouldn't really have to port forward if you are connecting within your network. The firewall on my router is not setup for port forwarding, and I can login to the other machine no problem Here's the problem with the port forwarding on some routers, it is that you can no longer assign dynamic addresses to each machine connected to the router, which could be a pain in the butt if you're not familiar with assigning static ips.
First things first in dealing with this potential issue...
Are you sure that you are trying to connect to the right IP address? On the ssh server, run /sbin/ifconfig or /usr/sbin/ifconfig. You shouldn't need to be root in order to run this, then write down the IP address for eth0. Now making sure that sshd is running on this machine, try to ssh into it from your other machine.
haha, oh wow I'm an idiot, i was trying to connect to the routers ip address i think. To find my ipaddress before I was just going to www.whatismyip.com. Once I use ifconfig i found my box's true ip address and now its working great.
Yeah, I think the ip address you are getting from that website is the ip address of your router. That's whyat you would need to be able to ssh into your machine from outsitde of your network. This is what I was talking about earlier. To login from anywhere, check the router documentation about port forwarding, because it may require that you turn off dhcp settings, and assign static ips to each computer on the router. After that, you can forward the TCP port for ssh (I believe it's 21) to that particular computer. Then use the ip from the web site and login this way. I got as close as this to settting up my ssh server, but unfortunately my landlord owns the router, and I can't just turn off dhcp for everyone in the apartment complex. Dangit!
ok, i haven't had a chance to try and login from outside my network yet, but i'm looking into port forwarding for that. My current goal is to get apache up and running on the linux computer now, so I assume that will require port forwarding as well. I'll figure it out eventually. Its tough when i can only accessthe network from my home, i need to go to a friends house or something.