[opensuse] Repair Broken SSH
I have a system with a broken installation of openssh, suddenly one day I can not use the scp command at all. I removed all config files relating to ssh and removed/reinstalled the openssh package, now besides the scp command being broken I can not even start the SSH service, it complains about the RSA keys are not generated. I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2010-11-13 at 03:08 -0500, Andrew Joakimsen wrote:
I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE?
I suppose that you delete (or rename) /etc/ssh/*, and perhaps users ~/.ssh/* - -- Cheers, Carlos E. R. (from 11.2 x86_64 "Emerald" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEARECAAYFAkzeoqQACgkQtTMYHG2NR9UGiQCfdmOCIqjKLAzwIno95+VoM5U6 SRoAnirwDYf6DE0+RsQS/00w7Ejl4320 =d7qY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 11/13/2010 12:08 AM, Andrew Joakimsen wrote:
I have a system with a broken installation of openssh, suddenly one day I can not use the scp command at all. I removed all config files relating to ssh and removed/reinstalled the openssh package, now besides the scp command being broken I can not even start the SSH service, it complains about the RSA keys are not generated.
I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE?
ssh-keygen as root. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, Nov 13, 2010 at 14:51, John Andersen <jsamyth@gmail.com> wrote:
On 11/13/2010 12:08 AM, Andrew Joakimsen wrote:
I have a system with a broken installation of openssh, suddenly one day I can not use the scp command at all. I removed all config files relating to ssh and removed/reinstalled the openssh package, now besides the scp command being broken I can not even start the SSH service, it complains about the RSA keys are not generated.
I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE?
ssh-keygen as root.
That still does not generate the SSH fingerprint, like it does with a fresh configuration. Also, I still have the original issue which is when I try to SCP files to other machines it fails with the error: command-line: line 0: bad configuration option: passwordprompt -- Med Vennlig Hilsen, A. Helge Joakimsen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 23 November 2010 03:51:55 Andrew Joakimsen wrote:
I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE?
ssh-keygen as root.
That still does not generate the SSH fingerprint, like it does with a fresh configuration.
If we're talking about openSUSE openssh package, then sshd start script should automatically create the host keys upon start, if there are no host key definitions in /etc/ssh/sshd_config and the default files do not already exist. Just have a look at /etc/init.d/sshd to see what is supposed to happen during sshd start.
Also, I still have the original issue which is when I try to SCP files to other machines it fails with the error:
command-line: line 0: bad configuration option: passwordprompt
You either have an alias or script named scp where that invalid option 'passwordprompt' is set (unless you actually defined that option yourself in the scp command, which I doubt). -- Martti Laaksonen -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday, November 23, 2010, Martti Laaksonen <martti.laaksonen@sci.fi> wrote:
On Tuesday 23 November 2010 03:51:55 Andrew Joakimsen wrote:
I don't care about the configuration or preserving anything. How can I restore SSH configuration to be exactly like it would be after a new installation of openSUSE?
ssh-keygen as root.
That still does not generate the SSH fingerprint, like it does with a fresh configuration.
If we're talking about openSUSE openssh package, then sshd start script should automatically create the host keys upon start, if there are no host key definitions in /etc/ssh/sshd_config and the default files do not already exist.
Just have a look at /etc/init.d/sshd to see what is supposed to happen during sshd start.
Also, I still have the original issue which is when I try to SCP files to other machines it fails with the error:
command-line: line 0: bad configuration option: passwordprompt
You either have an alias or script named scp where that invalid option 'passwordprompt' is set (unless you actually defined that option yourself in the scp command, which I doubt).
-- Martti Laaksonen -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I never changed the scp script, so how do i reset everything in ssh and scp to be like it was with a new installation? -- Med Vennlig Hilsen, A. Helge Joakimsen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Andrew Joakimsen <joakimsen@gmail.com> [11-23-10 15:49]:
I never changed the scp script, so how do i reset everything in ssh and scp to be like it was with a new installation?
Please consider trimming your quots. rpm -qf `which scp` will tell you which package contains scp rpm -qfl `which scp` will provide you with the included files those named ...config... or ...conf... and/or existing below /etc/ usually relate to configuration some of which will exise below ~/.ssh/ zypper in -f openssh will reinstall the package but does not overwrite changed configuration files -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Nov 23, 2010 at 17:06, Patrick Shanahan <paka@opensuse.org> wrote:
zypper in -f openssh will reinstall the package but does not overwrite changed configuration files
Like I said I want to reset SSH config to *EXACTLY* like it is immediately after a new installation. I don't want to preserve anything! Anyways I've gotten SCP working and just installed telnet-server which works as well as sshd, so I consider this "resolved enough." -- Med Vennlig Hilsen, A. Helge Joakimsen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 23 November 2010 22:47:36 Andrew Joakimsen wrote:
I never changed the scp script, so how do i reset everything in ssh and scp to be like it was with a new installation?
Just to clarify, scp, as installed from openssh package, is an executable binary _not_ a script. If you're still having problems with sshd/scp after re-installing openssh like Patrick instructed in another response, then you could enter command type -a scp in a terminal to see how your shell would interpret scp if used as a command name (assuming that bash is your default shell). It should print something like this (in openSUSE 11.3): testuser@darkside:~> type -a scp scp is /usr/bin/scp scp is /usr/bin/X11/scp If, on the other hand, you have an scp alias or a script called scp lurking somewhere in your shell's PATH, you might see something like this instead: testuser@darkside:~> type -a scp scp is aliased to `scp -o passwordprompt' scp is /home/testuser/bin/scp scp is /usr/bin/scp scp is /usr/bin/X11/scp -- Martti -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Andrew Joakimsen
-
Carlos E. R.
-
John Andersen
-
Martti Laaksonen
-
Patrick Shanahan