Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #175144
| From | Richard Hector <richard@walnut.gen.nz> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: How to get ssh to run in daemon script |
| Date | 2016-11-28 13:30 +0100 |
| Message-ID | <sIteh-22H-17@gated-at.bofh.it> (permalink) |
| References | <sI5vj-3xy-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On 27/11/16 23:55, Russell Gadd wrote: > So I'm scrambling around in the dark. Currently my vague ideas as to > what might be wrong are: > > script doesn't know what nasbox is (it is defined in /etc/hosts) You could test that by using the IP address > ssh is being run without being associated as root > ssh cannot find root's keys This seems the most likely to me - if $HOME isn't set in the script's environment, for example. You could explicitly tell ssh where to find the required key, with the -i option - eg: /usr/bin/ssh -i /root/.ssh/id_rsa root@nasbox poweroff > nas doesn't recognise login as authorised user > > I'm also starting to think I am stressing the UPS too much by running > too many power off tests, so I'd like to resolve this without too much > more experimentation. You could do your testing by sshing to a different box (even localhost) and/or running a different command? eg "ssh root@localhost whoami > /root/test.out" ... and have a look at the file afterwards Richard
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to get ssh to run in daemon script Russell Gadd <russ.mail.lists@gmail.com> - 2016-11-27 12:10 +0100
Re: How to get ssh to run in daemon script Nemeth Gyorgy <friczy@freemail.hu> - 2016-11-27 14:00 +0100
Re: How to get ssh to run in daemon script Russell Gadd <russ.mail.lists@gmail.com> - 2016-11-27 22:10 +0100
Re: How to get ssh to run in daemon script Richard Hector <richard@walnut.gen.nz> - 2016-11-28 13:30 +0100
Re: How to get ssh to run in daemon script Russell Gadd <russ.mail.lists@gmail.com> - 2016-11-28 22:30 +0100
csiph-web