centerclick / feedback

Issues, Bug Reports, and Feature Requests
7 stars 0 forks source link

BUG?? Non-interactive SSH session denied when doing a remote reboot #106

Open sgrayban opened 10 months ago

sgrayban commented 10 months ago

For some reason my ntp200 constantly loses its network every few days which requires me to pull the power to reboot it. So I wanted to simply reboot the the ntp server daily using crontab but when doing that I get this error

$ ssh admin@ntp reboot
X11 forwarding request failed on channel 0
Non-interactive SSH session denied.

Why is this not allowed?? Seems to be a bug.

sgrayban commented 10 months ago

Found a work around using expect.....

#!/usr/bin/expect -f
set timeout 30
spawn ssh admin@ntp
expect "clock.borgnet.us> "
sleep 5
send -- "reboot\r"
expect "expect eof"
dave4445 commented 7 months ago

correct, ssh with args is blocked (along with selected scp, etc...), though I get your point, it could be enhanced to run a single command