Page 1 of 1

Tools Thread

Posted: Thu Nov 12, 2009 9:05 pm
by sady
Lets share some our custom tools!

I have putty portable (http://portableapps.com/apps/internet/putty_portable) and WinSCP Portable(http://portableapps.com/apps/internet/winscp_portable) located on my dude server under \\dude\tools
So, be putting this line in SSH tool
cmd /C  (IF NOT EXIST \\dude\tools (start z:\usr\bin\gnome-terminal -e "ssh [Device.FirstAddress]" )) && IF EXIST \\dude\tools start \\dude\tools\PuTTYPortable\PuTTYPortable.exe [Device.FirstAddress]
we get ssh client both on Windows and Linux(under wine) :)


Same for sftp
cmd /C  (IF NOT EXIST \\dude\tools (start z:\usr\bin\nautilus sftp://[Device.FirstAddress] )) && IF EXIST \\dude\tools start  \\dude\tools\WinSCPPortable\WinSCPPortable.exe    %USERNAME%@[Device.FirstAddress]
You can use %USERNAME%@ for using your current windows login name as login to server, or don't.

WIndows RDP(remote desktop protocol)
cmd /C  (IF NOT EXIST \\dude\tools (start z:\usr\bin\rdesktop -k en-us -g workarea  [Device.FirstAddress] )) && IF EXIST \\dude\tools start "" mstsc /v:[Device.FirstAddress]
here \\dude\tools folder existens checked to determine windows on linux currently under dude client. If you know better way to check this, i be happy to hear it :)

Re: Tools Thread

Posted: Thu Nov 12, 2009 10:16 pm
by stmx38
Windows Shutdown

Name:Windows Shutdown
Type:execute
Command:
c:\windows\system32\shutdown.exe -s -t 30 /m \\[Device.FirstAddress]
sady
Is it possible to create Linux Shutdown ?

Thanks.

Re: Tools Thread

Posted: Fri Nov 13, 2009 3:53 pm
by sady
With Linux shutdown security will be the issue. You can:
- login by ssh as regular user, sudo send shutdown
- login by ssh as root, send shutdown

Linux:
ssh <user>@<hostname> -c 'sudo shutdown'
Windows(Putty):
echo sudo shutdown > FILE && putty.exe <user>@<hostname> -m FILE
in first case when you will "sudo" system will ask your password, and that password will be on screen(because your running script on ssh session login :( )
in second case your system will permit ssh root login, which is bad.

I really don't need to reboot(shutdown) my linux server very often( truly speaking, i need it only on emergency).

Re: Tools Thread

Posted: Mon Nov 16, 2009 8:29 pm
by stmx38
Thanks, sady
I will be try.
I need to shutdown Linux in my office - Desktop PC.

Re: Tools Thread

Posted: Fri Nov 20, 2009 11:38 pm
by keith
Here is one for forcing WSUS updates

c:\shared\\wsusup2.6.bat [Device.FirstAddress]

wsusup2.6.bat

c:\ra\pstools\psexec \\%1 -u ***\**** -p ***** cmd /c cscript \\cs-rm116\shared\wsusup2.6.vbs

and the vbs file wsusup2.6.vbs is attached

CREDITS - I did not create any of this. i got the vbs file from somewhere (Rob Dunn wrote it) and made a few minor modifications to it

Re: Tools Thread

Posted: Sat Nov 21, 2009 12:16 am
by keith
Here is another one i use a lot for remote access. It uses vnc and uninstalls when you are done. Again someone else did the work i just downloaded and use it.

The command is

c:\\ra\ChrisControl-v1.7.exe /h:[Device.Name] /v /rvncf /noask /remvnc /go

Chris control allows you to connect using rdp or vnc. I force vnc to connect. It can be downloaded from

http://www.chall.plus.com/winpe/