![]() |
Need help cleaning up OpenSSH server install.
So I was installing OpenSSH server on my N900.. made it past the point of it asking me for a new root password.
Then I dropped my phone, the back flew off and the battery came out. :( The N900 started up fine again, but the openssh server does not work (I expected that to happen since it never truly finished installed) I can "uninstall" it fine from the app-manager, then attempt to reinstall it. When I do, it tells me the installation fails, but it appears yet again in my uninstall list. Upon attempting to ssh to the n900 (localhost) it fails to connect, so it's not working. Any ideas or help on how I can clean up this botched install and start clean with it? |
Re: Need help cleaning up OpenSSH server install.
There are 3 installers in the repos. I had a simmilar issue and I managed to get rid of it by playing with those.
Dunno if this will help but give it a try. |
Re: Need help cleaning up OpenSSH server install.
Is there anything in Application Manager logs?
or the output of "apt-get install openssh-server"? |
Re: Need help cleaning up OpenSSH server install.
Root password needed so you could login, not for it to work. For example I use rsa auth instead.
Quote:
Also it might be because sshd is not started after installing package, reboot device or run this Code:
/etc/init.d/ssh start |
Re: Need help cleaning up OpenSSH server install.
have you try cleaning the install??
i.e. sudo apt-get remove --purge openssh-server in xTerm? Hopefully that will bring it back to a state where you can start off scratch again. |
Re: Need help cleaning up OpenSSH server install.
1. Check is it on or off:
a) open x-term b) type "ps | grep sshd" if you will get line with "/usr/sbin/sshd" It is working. 2. type "rm -R /root/.ssh" it will remove all settings for ssh |
Re: Need help cleaning up OpenSSH server install.
My personal guess is it needs a dpkg-reconfigure .. but won't know without a log report or command output.
|
Re: Need help cleaning up OpenSSH server install.
Quote:
from the N900. There are corrupted files on the N900 somewhere. I need to figure out what all I need to clean-up |
Re: Need help cleaning up OpenSSH server install.
Quote:
|
Re: Need help cleaning up OpenSSH server install.
dpkg: error processing openssh-server (--purge):
subprocess post-removal script returned error exit status 1 Errors were encountered while processing: openssh-server E: Sub-process /usr/bin/dpkg returned an error code (1) |
Re: Need help cleaning up OpenSSH server install.
Code:
dpkg-reconfigure openssh-server |
Re: Need help cleaning up OpenSSH server install.
dpkg -reconfigure does not work
dpkg-reconfigure is not found. |
Re: Need help cleaning up OpenSSH server install.
It should all be one word.
Seriously? The N900 lacks dpkg-reconfigure? Fail. Check in /usr/sbin - someone else had a problem where /usr/sbin wasn't in their $PATH. You're running all these commands as root, correct? |
Re: Need help cleaning up OpenSSH server install.
Quote:
I did a "find / -name "dpkg*" -print" and looked at all dpkg* stuff. It is not there. echo $PATH /bin:/usr/bin:/sbin:/usr/sbin |
Re: Need help cleaning up OpenSSH server install.
Try this then...
Code:
dpkg --configure openssh-server |
Re: Need help cleaning up OpenSSH server install.
Updated that... I misread the command I think.
|
Re: Need help cleaning up OpenSSH server install.
dpkg: error processing openssh-server (--configure):
package openssh-server is not ready for configuration cannot configure (current status 'config-files') Errors were encountered while processing: openssh-server |
Re: Need help cleaning up OpenSSH server install.
Please note, openssh-server is currently "uninstalled"
I am not able to reinstall it due to some leftover stuff lying around after the battery was knocked out mid-install. |
Re: Need help cleaning up OpenSSH server install.
In the past when I've interrupted the postint scripts it causes a failure in dpkg's configuration. Usually rexconfiguring the packages re runs that. Try installing again via apt-get and then if it fails using the cofigure command.
|
Re: Need help cleaning up OpenSSH server install.
um.. try
sudo apt-get install --reinstall openssh-server I'm just throwing it out there :P |
Re: Need help cleaning up OpenSSH server install.
Quote:
|
Re: Need help cleaning up OpenSSH server install.
Alright, performed a command line install using --reinstall.
It pulled the deb, asked me for a password, but then said: chpasswd: can't lock password file. Then it created some SSH keys. Then said: useradd: unable to lock password file Afterwards, I tried to ssh localhost again and failed. Doesn't appear to be working still. |
Re: Need help cleaning up OpenSSH server install.
ls -al /etc/ | grep passwd
|
Re: Need help cleaning up OpenSSH server install.
Quote:
|
Re: Need help cleaning up OpenSSH server install.
-rw-r--r-- 1 root root 1003 Jan 13 10:27 /etc/passwd
|
Re: Need help cleaning up OpenSSH server install.
there should be a few .lock files in there... shadow.lock, passwd.lock, and group.lock.
They need to be removed... Short of this... check your root filesize usage... it might be full. |
Re: Need help cleaning up OpenSSH server install.
there is a "passwd. lock" (yes, with the space)
Not sure how to remove it |
Re: Need help cleaning up OpenSSH server install.
It has a space?? Wow FUBAR'd.
Code:
rm /etc/passwd.\ lockCode:
ls -al /etc/ | grep lock |
Re: Need help cleaning up OpenSSH server install.
Hi I have a similar problem however I have the following in /etc/
(passwd-) this is -rw------- (passwd) this is -rw-r--r-- and I can't SSH into the N900 from my linux machine the SSH daemon is up and able to bring the RSA fingerprint and not really sure where its going wrong. Edit: Should I remove these and reinstall? |
Re: Need help cleaning up OpenSSH server install.
Nono.. don't remove the passwd file ;). That's quite important.
The passwd- can be ignored as well. Your problem does not appear to be the same... can you run: Code:
ssh root@localhost |
Re: Need help cleaning up OpenSSH server install.
Quote:
Edit: I was using putty via Win7 somehow it does not work directly connecting root@localhost. I managed to get it working with by using my NIX machine to the N900. It also works by using putty by ssh'ing to a NIX machine and then ssh'ing onto N900. The issue is with the putty client itself! |
Re: Need help cleaning up OpenSSH server install.
It was the lock file, problem solved
|
Re: Need help cleaning up OpenSSH server install.
Glad you got it sorted.
|
| All times are GMT. The time now is 10:51. |
vBulletin® Version 3.8.8