How to remotely shut down tahrpup 6.0.5 64 from windows 7?

Puppy related raves and general interest that doesn't fit anywhere else
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: How to remotely shut down tahrpup 6.0.5 64 from windows 7?

#21 Post by s243a »

][V][ wrote:Update

I got "openssh-server_6.6p1-2ubuntu2.8_amd64.deb"

And

I got "telnetd_0.17-36build2_amd64.deb"

From the link above
And late last night I tried them and this is the detail on what happened:

first, before doing anything I thought why don't I revert everything back since all the things I tried did not work, so I uninstalled the telnet and openssh (which was the 32 and did not work), I also uninstalled "xauth_1.0.7-1ubuntu1_amd64.deb" and also deleted that script that I made that was suggested in the beginning of this discussion and rebooted tahrpup.

...

than I thought OK, just forget about it and try the oppenssh

uninstalled telnet, reboot, installed "openssh-server_6.6p1-2ubuntu2.8_amd64.deb"

Went to see if everything was there which was, so tried to start, got error, almost same kind of error, it was saying something like "share lib" does not exist, tried to find sshd in usr/sbin, it was there but it did not look like all normal program with kind of like wheel looking icon, instead the icon looked like "#", I doubled clicked on it, nothing was executed but I got a windows looked like kind of property kind of windows and there was a list of files, most of them having "lib" and "dll" in their names, looked like the sshd is kind of .Zip archive and maybe that's why it was giving me the error.

....
I'm using fatdog64 which I believe comes with open ssh installed. Here is what I have for configuration options in
/etc/ssh/sshd_config

Code: Select all

PermitRootLogin yes
AuthorizedKeysFile	.ssh/authorized_keys
AllowTcpForwarding yes
AddressFamily inet
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
TCPKeepAlive yes
UsePrivilegeSeparation sandbox		# Default for new installations.
Subsystem	sftp	/usr/libexec/sftp-server
AllowUsers root spot
Here is my previous thread:
http://murga-linux.com/puppy/viewtopic.php?t=110157

The script to start sshd on fatdog 64 is as follows
/etc/init.d/65-sshd

Code: Select all

#!/bin/dash

DAEMON=sshd
DAEMON_BIN=/usr/sbin/sshd

is_up() {
	pidof $DAEMON > /dev/null
}

start() {
	if ! is_up; then
		$DAEMON_BIN
		echo $DAEMON started
	fi
}

stop() {
	if is_up; then
		killall $DAEMON
		echo $DAEMON stopped
	fi
}

reload() {
	if is_up; then
		killall -HUP $DAEMON
		echo $DAEMON configuration reloaded
	else
		echo $DAEMON is not running
	fi
}

### main
case $1 in
	start) start ;;
	stop) stop ;;
	status) is_up && echo "$DAEMON is running" || echo "$DAEMON is stopped" ;;
	reload) reload ;;
	restart) stop; sleep 1; start ;;
esac
I've also bookmarked pleanty of stuff on pearltrees but it is easy to find plenty on google:
http://www.pearltrees.com/s243a/ssh-linux/id16286760
Attachments
SSH (Linux).zip
Simplemind mind map notes on ssh
(39.55 KiB) Downloaded 95 times

User avatar
][V][
Posts: 17
Joined: Mon 29 May 2017, 01:53

How to remotely shut down tahrpup 6.0.5 64 from windows 7?

#22 Post by ][V][ »

Hi, "s243a"

Thank you for your suggestion, I have been busy in the past a few days and I could not come here and check, I also could not work on this and I will be busy for the next a few days, maybe next week I will get some time and I will try your suggestion.

Is "fatdog64" the same as "tahrpup", I mean I really don't want to change the OS just for this little problem and my tahrpup did not come with ssh, i have to get it.

I am trying my best with the help of people but if I could not solve this problem, I would just forget about it and leave things the way they are as I am getting by and it is serving me well,

I just thought it would be nice to shut down tahrpup remotely when i don't need it but if i can not get what I want, I just leave it, I mean after all I already have schedule shut down at 2 am every night anyway and usually kids are watching some movies until around midnight , so we are basically talking about almost 2 hours gap here and I am trying but if noting works, I just leave everything as it is,

anyway as I said I have been busy for the past a few days and I will be busy in the next a few days too, as soon as I get some time I will get back to it and I will try your method and report back

User avatar
][V][
Posts: 17
Joined: Mon 29 May 2017, 01:53

How to remotely shut down tahrpup 6.0.5 64 from windows 7?

#23 Post by ][V][ »

"Problem Solved" :-)

Update

So after almost a week being busy and not being able to get back to this, finally I got some time,

so thanks to "s243a" for giving me those links,
I could not get or do a lot with all those scripts and configuration and also did not know what to do with the SSH.Zip but I did read everything and I went to those links and one thing led to another, from site to site and eventually I found my way to this site:

http://ubuntuguide.net/install-and-enab ... untu-linux

There I followed the instruction and installed:

"telnet_0.17-36build2_amd64.deb"

And noticed for some reason even it tells me everything installed correctly but I could not find any ".conf" file anywhere so I kind of thought this is not right and not having the ".conf" file I was not able to do exactly the site was suggesting because the next step was that I had to edit the telnet conf file and do this:

2.Edit /etc/inetd.conf using your favorite file editor with root permission,add this line:

telnet stream tcp nowait telnet /usr/sbin/tcpd /usr/sbin/in.telnetd

I could not do that because there was not "inetd.conf" anywhere o my tahrpup

So, I thought oh god, another dead end for me but than I told myself just ignore this part and continue with the rest of instruction, lets see what happens,

so left everything the way it was (at this point "telnetd_0.17-36build2_amd64.deb" was installed but did not looked right to me since I could not find any "inetd.conf" but left it as it was, did not even installed it, just left it as it was)

OK, next, went and got "xinetd_2.3.15-3ubuntu1_amd64.deb" and installed it and fallowed the site instruction for editing the .conf file, also gave rules to just allow connection from specific IP I had in mind (windows machine), also added "xinetd" to startup in tahrpup and removed firewall from tahrpup startup.

Rebooted tahrpup and crossed my finger, went to windows, opened command not even putty just simple windows command, ping to tahrpup, ping worked,

telnet to tahrpup IP and boooom, I got in, I was so happy,

gave usr and pswd and just to see if I can get what I want just typed "poweroff" and there you go, tahrpup went true shutdown in an blink of an eye,

the only thing I noticed was:

if you go with normal shutdown within tahrpup, usually after you click shutdown, the GUI goes off and then you get a command screen saying, saving session before shutdown and than you will see the message unplugging USB and things like that and then the machine shuts down.

Now when I typed poweroff from telnet I noticed right away my TV screen went off (tahrpup is connected to TV with hdmi) no command message but I was looking at tahrpup hard drive blinking light , it was blinking and did some work for like 10-15 seconds before completely went off, so I don't know if when you send a poweroff command from telnet,

dose it just "crush" the tahrpup without saving the session and do some other things in order to shut down properly?

Or

It dose everything the way it should be , its just kills the screen first so I wont be able to see all the command messages, this part I don't know.

The other thing I also found is that the "poweroff" and or "halt" exactly do the same thing, the only different is, if you go with "halt" you just type 4 letter less

at this point I would like to say that, my problem with shutting down tahrpup remotely with telnet is solved thanks to all of you guys and all those other forums and sits and their info, suggestions and instructions

Now, next, what I would like to find out and do is:

is there a way to just type the IP and get it work without being prompt for usr and pswd?

And if not, I am going to try to find out if there is a way so I could make ".bat" file giving all the necessary information like IP, usr, paswd and poweroff command to the .bat file and than just click on the ".bat" file in windows and let it do everything, like just one click shut down, but all of that is just on curiosity and like a hobby , I am already happy with the way things are working now, so this was my updates and once more thank you all.

Post Reply