Do we have plink?

3rd Party Package Requesting

Do we have plink?

Postby justdave » Sun Jun 12, 2011 11:31 am

I can't seem to find the binary for plink in FREESCO. I remember having it at one time, but now it's not even on my FREESCO development box :( Does it exist in one of the packages? Is there a website where I could find it?

thanks

dave
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA

Re: Do we have plink?

Postby justdave » Sun Jun 12, 2011 1:35 pm

I have done some searching around and don't think I ever had plink on FREESCO.

I think that ssh could do the job, but I would need to have a password option in the command line.

Alternately I could set up the authorized keys, but I have been fighting with that all morning and cannot find where to put which key on the FREESCO machine.

Any help would be appreciated.

thanks

dave
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA

Re: Do we have plink?

Postby Lightning » Mon Jun 13, 2011 8:49 pm

Alternately I could set up the authorized keys, but I have been fighting with that all morning and cannot find where to put which key on the FREESCO machine.
Yes that is the way to use plink in FREESCO.
The directory you need to put the key in is '/home/root/.ssh' and the file name is 'authorized_keys'. This file is owned by root with only read write permissions by the owner.

chown root:root authorized_keys
chmod 0600 authorized_keys

If you generate a key with the puttygen binary on a Windows machine and then open a PuTTy/SSH window on your FREESCO box. Then start mc with the edit command on that file name or use mcedit directly on that file name you can paste the key into the file using the right mouse button. The part that needs to be pasted is the part that is on the screen in the puttygen window Just make sure to add a carriage return at the end of the key in the file because by default it is one long line without it. You then can use the same key file for PuTTy connections without requiring a login each time as well.

I am assuming in the above instructions that you want to use plink from a remote machine and connect to FREESCO to perform a task.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Do we have plink?

Postby justdave » Mon Jun 13, 2011 8:54 pm

Wouldn't this be for a remote to putty into FREESCO?

I am trying to shut down remote computers when the power goes off, so I have to send the shutdown command to the remotes.

dave
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA

Re: Do we have plink?

Postby Lightning » Mon Jun 13, 2011 9:11 pm

Hmmmmm I suspect that you can use the 'ssh' command which is a part of Dropbear along with a script to do what you are asking. The ssh part of Dropbear can use any authorized key file and it is specified on the command line. So in essence it would be a script that controls an SSH connection doing the job of plink. There should be examples on how to use the Dropbear SSH option and using a key file to log in. The best way to start is to get the command working manually from the command line and then make a simple script to do it automatically. Which would be pretty simple if I new the commands needed.

ssh -p <remoteport> -y -t -i <identityfile> -l <username>


-p <remoteport>
-y accept remote host keys, if unknown
-t Allocate a pty
-T Don't allocate a pty
-i <identityfile> (multiple allowed)
-L <listenport:remotehost:reportport> Local port forwarding
-R <listenport:remotehost:remoteport> Remote port forwarding
-l <username>
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Do we have plink?

Postby Lightning » Mon Jun 13, 2011 9:20 pm

On a secondary note, I am wondering if the nut package has some of this built into it. Because it is a UPS network monitoring server and client. So clients could monitor the status of a UPS and make there own determinations on shut down procedures.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Do we have plink?

Postby justdave » Mon Jun 13, 2011 10:44 pm

I've already got nut installed and working, but the shutdown command for the remote computers has me stumped. I think my brain has turned to mush.

I need just the following:

1. generate a private/public key pair ( does FREESCO already have this?)
2. Find out which directories each one needs to go on for each machine.

I'm pretty sure that some of the information should go on the remote machines in the authorized keys files. I'm not sure where to find this key or whether I should generate it myself. If FREESCO already has it generated for the ssh command, where would I find it?

thanks

dave
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA

Re: Do we have plink?

Postby Lightning » Tue Jun 14, 2011 12:37 am

I'm pretty sure that some of the information should go on the remote machines in the authorized keys files. I'm not sure where to find this key or whether I should generate it myself. If FREESCO already has it generated for the ssh command, where would I find it?
Yes there are two parts of any key file and half to each machine. The receiving machine in the authorized_key file. But the location is dependent on the OS and the SSH server that is running. Dropbear uses a different key file than what OpenSSH uses. So to give more details requires more information about the client OS and servers running.

As for using 'nut' and remotely shuting down a machine. The client must be running a nut compatible client and monitoring the status of the server. It then shuts down the machine based on the status of the remote UPS on it's own without the need for the server to send a command.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Do we have plink?

Postby justdave » Tue Jun 14, 2011 11:17 am

D'oh. I forgot that nut could do that. I have now installed nut on the client machines and will play around with the shutdown settings.

I also have to find a windoze client for the one box I have that still runs that.

Thanks Lewis for jump-starting my brain.

dave
justdave
Junior Advanced Member
 
Posts: 124
Joined: Sat Dec 22, 2001 2:00 am
Location: san jose Ca USA


Return to 3rd Party Package Requesting

Who is online

Users browsing this forum: No registered users and 0 guests