Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I have a CentOS server running on a dedicated machine. I downloaded the opens-server and -clients packages. I can start the server, but cannot connect to it from my laptop. When I attempt to connect from my Mac, the error says it can't connect to port 22.
So I can't really think of anything I did wrong...When I run "/sbin/service sshd status" I get
Code:
/etc/init.d/sshd: line 33 : /etc/sysconfig/sshd: Permission denied
openssh-daemon (pid 3265) is running...
I really hope you guys can help me with this, I've been struggling with it for a while. If anyone needs more information to help debug the problem just lemme know. Just a heads up: I'm a Linux newb, still getting used to everything. Thanks
If the server is running on port 22, and the firewall is open, then you should have access on the LAN. If you are still unable to access then either one or the other of these two is not true, or you are trying to connect to the wrong host.
If the server is running on port 22, and the firewall is open, then you should have access on the LAN. If you are still unable to access then either one or the other of these two is not true, or you are trying to connect to the wrong host.
Pretty sure it should be working. The only criteria I would maybe question is if it's running on port 22. But I figure it has to be since it should run on that by default, from what I understand. I'm all out of ideas at this point.
also 'cut and paste' the complete ( it should show the username on the system) command from client side your are invoking. Please show the error message as well.
also 'cut and paste' the complete ( it should show the username on the system) command from client side your are invoking. Please show the error message as well.
Root should be refused by default, unless you've changed that in the configuration. Port 22 is listening, so sshd is running. The problem is likely in your firewall configuration. Try running the configuration tool and hit 'disable' to stop the firewall. With the firewall down, try to ssh (as a user, not root).
Root should be refused by default, unless you've changed that in the configuration. Port 22 is listening, so sshd is running. The problem is likely in your firewall configuration. Try running the configuration tool and hit 'disable' to stop the firewall. With the firewall down, try to ssh (as a user, not root).
Disabled firewall, applied, still get
Code:
:~ joe$ ssh Joe@173.85.114.242
ssh: connect to host 173.85.114.242 port 22: Connection refused
If I try connecting with a two word username(which does not exist on the server), I get
Code:
:~ joe$ ssh Joe k@173.85.114.242
ssh: Could not resolve hostname Joe: nodename nor servname provided, or not known
It probably means nothing. But it's the only result I've ever gotten besides "Connection refused".
My next guess is maybe it has something to do with my router? Maybe forward ports or something? If the machine is running like its supposed to thats the only thing I can think of.
Can you please paste output of the command (run on ssh server) ?
Code:
ip addr
Also try ssh using private IP if possible.
Also you can do the following to troubleshoot
When you are running ssh command at client. Before that run the command at ssh server and watch for errors
Code:
#tail -f /var/log/auth.log
It will give you info what is happening at server side
Last edited by KinnowGrower; 08-11-2012 at 11:05 AM.
Reason: added tip for tail command
Can you please paste output of the command (run on ssh server) ?
Code:
ip addr
Also try ssh using private IP if possible.
Also you can do the following to troubleshoot
When you are running ssh command at client. Before that run the command at ssh server and watch for errors
Code:
#tail -f /var/log/auth.log
It will give you info what is happening at server side
Ok so I've been trying to connect to my public IP. Stupidly enough, I just now tried my private IP and it finally connected. Though how would I go about connecting when I'm not on my LAN network?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.