View previous topic :: View next topic |
Author |
Message |
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Fri Apr 14, 2017 10:07 pm Post subject: [SOLVED] How do I get a new service running? |
|
|
When I needed to start a service at boot e.g. sshd:
rc-update add sshd default
The output is this:
* rc-update: service 'sshd' does not exist
I tried:
service sshd start
* service: service 'sshd' does not exist
So how do I make sshd existent and start it? Sorry for being such a noob. _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep
Last edited by roboto on Sat Apr 15, 2017 12:51 am; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 14, 2017 10:48 pm Post subject: |
|
|
roboto ...
Code: | # equery belongs -e /etc/init.d/sshd
net-misc/openssh-7.3_p1-r7 (/etc/init.d/sshd) |
So, I expect this isn't installed.
best ... khay |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6053 Location: Removed by Neddy
|
Posted: Fri Apr 14, 2017 10:49 pm Post subject: |
|
|
by ensuring openssh is installed
equery belongs /etc/init.d/sshd
* Searching for /etc/init.d/sshd ...
net-misc/openssh-7.5_p1-r1 (/etc/init.d/sshd) _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Fri Apr 14, 2017 10:58 pm Post subject: |
|
|
openssh is installed.
equery belongs /etc/init.d/sshd
* Searching for /etc/init.d/sshd ...
net-misc/openssh-7.3_p1-r7 (/etc/init.d/sshd)
Edit: I am able to ssh into other computers, but others can't ssh into my computer. I think that is due to the absence of sshd. _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6053 Location: Removed by Neddy
|
Posted: Fri Apr 14, 2017 11:22 pm Post subject: |
|
|
equery searches the installation database. If you cannot add the service could it have been deleted?
stat /etc/init.d/sshd
File: /etc/init.d/sshd
Size: 2108 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1262516 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-04-04 22:31:40.558909272 +0100
Modify: 2017-04-04 22:31:40.558909272 +0100
Change: 2017-04-04 22:32:02.188909249 +0100
Birth: - _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Fri Apr 14, 2017 11:26 pm Post subject: |
|
|
stat /etc/init.d/sshd
stat: cannot stat '/etc/init.d/sshd': No such file or directory
Do I create an sshd file then?
Edit: I created the file:
rc-update add sshd default
* rc-update: service `sshd' is not executeable
How do I make it executable? _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep
Last edited by roboto on Fri Apr 14, 2017 11:28 pm; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 14, 2017 11:27 pm Post subject: |
|
|
roboto wrote: | openssh is installed. |
roboto ... so what are you not telling us? ;)
Code: | # ls -l /etc/init.d/sshd
-rwxr-xr-x 1 root root 2114 2016-12-09 21:39 /etc/init.d/sshd
# rc update add sshd default
* service sshd added to runlevel default
# rc-update del sshd default
* service sshd removed from runlevel default |
So, it works here ... what version of openrc, and what other specifics relating to your install should we know about?
best ... khay |
|
Back to top |
|
|
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Fri Apr 14, 2017 11:31 pm Post subject: |
|
|
OpenRC version: 0.23.2
I created the sshd file in /etc/init.d/sshd but I do not know how to make it executable. _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 14, 2017 11:54 pm Post subject: |
|
|
roboto wrote: | I created the sshd file in /etc/init.d/sshd but I do not know how to make it executable. |
roboto ... as was shown above that file comes as part of net-misc/openssh, so if you've "created" it then you've probably trashed the one that came with the package, either re-merge the pacakage or do the following:
Code: | # cp /usr/portage/net-misc/openssh/files/sshd.rc6.4 /etc/init.d/sshd
# chown root:root /etc/init.d/sshd
# chmod u+rwx,go+rx /etc/init.d/sshd
# rc-update add sshd default |
best ... khay |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Apr 14, 2017 11:56 pm Post subject: |
|
|
roboto wrote: | I created the sshd file in /etc/init.d/sshd but I do not know how to make it executable. |
Code: | X3 ~ # equery f openssh |grep etc
/etc
/etc/conf.d
/etc/conf.d/sshd
/etc/init.d
/etc/init.d/sshd
/etc/pam.d
/etc/pam.d/sshd
/etc/skel
/etc/skel/.ssh
/etc/ssh
/etc/ssh/moduli
/etc/ssh/ssh_config
/etc/ssh/sshd_config
X3 ~ # ls -l /etc/init.d/sshd
-rwxr-xr-x 1 root root 2115 Feb 13 03:33 /etc/init.d/sshd
| The ebuild should have installed it. Are you sure you are not running systemd? |
|
Back to top |
|
|
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Sat Apr 15, 2017 12:03 am Post subject: |
|
|
The command you suggested did not work... the sshd file is not executable.
I am not running systemd, rather, I am running OpenRC and besides, I disabled systemd support in the kernel config.
equery f openssh |grep etc
/etc
/etc/conf.d
/etc/conf.d/sshd
/etc/init.d
/etc/init.d/sshd
/etc/pam.d
/etc/pam.d/sshd
/etc/skel
/etc/skel/.ssh
/etc/ssh
/etc/ssh/moduli
/etc/ssh/ssh_config
/etc/ssh/sshd_config
ls -l /etc/init.d/sshd
-rw-r--r-- 1 root root 0 Apr 14 18:26 /etc/init.d/sshd
rc-update add sshd default
* rc-update: service `sshd' is not executeable _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6053 Location: Removed by Neddy
|
Posted: Sat Apr 15, 2017 12:11 am Post subject: |
|
|
Delete the sshd in init.d and just re-emerge openssh _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Apr 15, 2017 12:24 am Post subject: |
|
|
roboto wrote: | The command you suggested did not work... the sshd file is not executable. |
roboto ... no, I explictly made it executable (via chmod ... see above). I also provided the obvious, no chmod required, solution (re-merge the package). You should be able to resolve this via one of those methods.
best ... khay |
|
Back to top |
|
|
roboto Apprentice
Joined: 15 Feb 2017 Posts: 156 Location: My IP address.
|
Posted: Sat Apr 15, 2017 12:50 am Post subject: |
|
|
That worked.
Thank you for your time! _________________ Answers please.
The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Quote: | Dude. Minus 30 credibility points. |
Yep |
|
Back to top |
|
|
|