Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
I installed Rhel 7 in my laptop and i could not start the sshd session. It always says that as below :
sshd-keygen: generating ssh2 rsa host key failed.
I tried to generate the key manually, but it not works.
Due to this am unable to connect the session with putty. Could anyone help me please.
please provide the exact commands you used, and everything they returned. please use the "-v" switch (=verbose) for ssh-keygen.
and some general info, in as much detail as you can.
I understood that in deafault the keys should be generated in /etc/ssh dir while installing. But i could not find the keys available in the dir.
I tried to start the sshd to login with putty and it thrown the error
I understood that in deafault the keys should be generated in /etc/ssh dir while installing. But i could not find the keys available in the dir.
I tried to start the sshd to login with putty and it thrown the error
Please see the LQ Rules about text-speak..and about not using it.
And you still haven't told us what version/distro of Linux you're using, so it's hard to provide details. Putty doesn't enter into this, since it's just a terminal client, and it sounds like you don't have SSH running on your Linux system. Are you running as root when you try to start that service? If you're not...it won't work.
Please see the LQ Rules about text-speak..and about not using it.
And you still haven't told us what version/distro of Linux you're using, so it's hard to provide details. Putty doesn't enter into this, since it's just a terminal client, and it sounds like you don't have SSH running on your Linux system. Are you running as root when you try to start that service? If you're not...it won't work.
Hi, Am sorry.
Am using Toshiba Laptop -- 4GB RAM with Windows 10.
Installed Redhat Linux 7 through Orcale VM Virtual Box Manager. The sshd process is not running and am unable to start it though.
Am trying to start the sshd service through Root. Please let me know, if you required any additional information.
you should have root privileges to start the daemon, but everything else you should do as a normal user, afaik.
generating & storing the keys in /etc/ssh seems extremely wrong to me.
i'm not surprised sshd refuses to start if you've been messing around in its system-wide config directory.
ssh is very particular about file permission (and a good thing too! after all you're opening your machine to the world!).
i suggest you check out a few of the ~100.000 ssh tutorials out there.
ps:
i still don't see how you are (re)starting the sshd, unless you are rebooting your machine after every change?
have you ever issued "sudo systemctl restart sshd"?
you should have root privileges to start the daemon, but everything else you should do as a normal user, afaik.
generating & storing the keys in /etc/ssh seems extremely wrong to me.
i'm not surprised sshd refuses to start if you've been messing around in its system-wide config directory.
ssh is very particular about file permission (and a good thing too! after all you're opening your machine to the world!).
i suggest you check out a few of the ~100.000 ssh tutorials out there.
ps:
i still don't see how you are (re)starting the sshd, unless you are rebooting your machine after every change?
have you ever issued "sudo systemctl restart sshd"?
Thanks Bro,
I used "systemctl restart sshd" through root. I executed "sudo systemctl restart sshd" and receives the same error.
job for sshd.service failed. See 'systemctl status ssdh.service' and 'journalctl -xn' for details.
sshd.service: control process exited,
Failed to start openssh server daemon.
unit sshd.service entered failed state.
journalctl -xn ---> says
Unit sshd.service has begun starting up.
sshd-keygen: Generating SSH2 RSA host key: [failed]
sshd.service: control process exited, code=exit.
Subject: Unit sshd.service has failed.
define-by: systemd
Unit sshd.service has failed.
The result is failed.
let's recap:
you are running the sshd daemon on your rhel server.
you want to connect to this server from some other machine via ssh. (putty suggests windows?)
for that you have to generate a key pair on the client machine, not the server (if you want passwordless login).
i have no clue why your sshd wants to generate keys upon startup, but i suspect it's because you've been messing around in /etc/ssh.
i could be wrong though.
i'm not using rhel.
i suggest you find out if it's normal that sshd on rhel wants to run a command called "sshd-keygen" (on my debian server there's no such command, only ssh-keygen).
after that you should find a good ssh tutorial, and understand what is the server side and what is the client side, amongst other things.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.