LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 05-12-2009, 11:27 AM   #1
Jani64
LQ Newbie
 
Registered: May 2009
Posts: 9

Rep: Reputation: 0
Why can't I start sshd?


Note: I do not have physical contact with my server, I have to call a friend and guide him(knows no Linux himself) whenever I need something done.

Hello! I've recently started using Linux(I'm a newbie) and decided to set up a server, and ssh worked fine for a while, until I started trying to get vsftpd to work, so here's my problem:

I tried getting vsftpd to work, I was able to log into my ftp client, but not transfer files (533 error, cannot write file), so I googled a little and they said it was because of bad user permissions, so they said that it would work if I wrote "sudo chown -R jani /var/vsftpd".

I tried that, and then ftp://jani64.ath.cx/ stopped working at all and I couldn't log into my FTP client. I was still logged into SSH though, but then later logged out because I rebooted my machine. And then when I tried logging in again, I get "Network error: Connection refused" in PuTTy.

Then I ran "nmap jani64.ath.cx -p22;" and it gave me this:
(85.167.228.130):
PORT STATE SERVICE VERSION
22/tcp open tcpwrapped

Then I called my friend to see if he could just stop the vsftpd service and restart the sshd service, to see if it works then. He was able to stop the vsftpd service but he wasn't able to start sshd, and it tells him that group must be owned by root or something along those lines.

So basically, my permissions are messed up, what do I do to make SSH work again?

Thanks in advance!
 
Old 05-12-2009, 11:46 AM   #2
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 105

Rep: Reputation: 16
Which distribution of linux is this?

Typically users manipulating O/S services must do so as root. Tell your friend to log into the server as the root account and try:

# /etc/init.d/sshd status
 
Old 05-12-2009, 12:06 PM   #3
Jani64
LQ Newbie
 
Registered: May 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I'm on Fedora 10

# /etc/init.d/sshd status
tells me that openssh daemon is stopped(because I don't have the permissions to start it, even as sudo)

Last edited by Jani64; 05-12-2009 at 12:10 PM.
 
Old 05-12-2009, 02:36 PM   #4
latinmusic74
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 16
Try chkconfig --list sshd to see is the SSHD daemon is ON.
 
Old 05-12-2009, 08:03 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,421

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
You're going to need to post the exact "something along those lines."
 
Old 05-13-2009, 02:35 PM   #6
Jani64
LQ Newbie
 
Registered: May 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
You're going to need to post the exact "something along those lines."
# sudo service sshd start
/var/empty/sshd must be owned by root and not group or world-writable
 
Old 05-13-2009, 02:48 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,421

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Quote:
/var/empty/sshd must be owned by root and not group or world-writable
That's clear enough: check the ownership and permissions on /var/empty and /var/empty/sshd. They must be owned by root (chown root /var/empty; chown root /var/empty/sshd) and not be writable by anyone except root (chmod go-w /var/empty/sshd; chmod go-w /var/empty). All commands run as root.

How did this happen?
Quote:
so they said that it would work if I wrote "sudo chown -R jani /var/vsftpd".
You must have mistyped and done "chown -R /var /vstfpd" or any number of variations that would hit more than vsftpd. Be careful when doing thing, especially when sudoing them!

Last edited by AlucardZero; 05-13-2009 at 02:50 PM.
 
Old 05-13-2009, 02:56 PM   #8
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 98
Have your friend run the commands (as root):

Code:
chown root:root /var/empty/sshd
chmod 711 /var/empty/sshd
/etc/init.d/sshd start
That should start sshd and you should then be able to log back in (unless there are additional problems).

HTH

Forrest
 
Old 05-13-2009, 04:39 PM   #9
Jani64
LQ Newbie
 
Registered: May 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by forrestt View Post
Have your friend run the commands (as root):

Code:
chown root:root /var/empty/sshd
chmod 711 /var/empty/sshd
/etc/init.d/sshd start
That should start sshd and you should then be able to log back in (unless there are additional problems).

HTH

Forrest
This fixed my problem!
Thank you!
 
  


Reply

Tags
permissions


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sshd won't start sysspy Linux - Server 2 12-21-2008 01:01 PM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 05:59 AM
sshd doesn't start wrich Slackware 4 09-26-2006 04:45 PM
getting sshd to start at boot eros Linux - Software 8 12-31-2003 02:06 PM
couldn't start SSHD jonnyb Linux - Networking 14 02-16-2003 04:39 PM


All times are GMT -5. The time now is 10:15 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration