Community discussions

MikroTik App
 
User avatar
sady
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Fri Jul 11, 2008 11:30 am
Location: Russia

Tools Thread

Thu Nov 12, 2009 9:05 pm

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 :)
 
User avatar
stmx38
Long time Member
Long time Member
Posts: 650
Joined: Thu Feb 14, 2008 4:03 pm
Location: Moldova, Chisinau

Re: Tools Thread

Thu Nov 12, 2009 10:16 pm

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.
 
User avatar
sady
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Fri Jul 11, 2008 11:30 am
Location: Russia

Re: Tools Thread

Fri Nov 13, 2009 3:53 pm

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).
 
User avatar
stmx38
Long time Member
Long time Member
Posts: 650
Joined: Thu Feb 14, 2008 4:03 pm
Location: Moldova, Chisinau

Re: Tools Thread

Mon Nov 16, 2009 8:29 pm

Thanks, sady
I will be try.
I need to shutdown Linux in my office - Desktop PC.
 
keith
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Thu May 24, 2007 12:30 am

Re: Tools Thread

Fri Nov 20, 2009 11:38 pm

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
 
keith
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Thu May 24, 2007 12:30 am

Re: Tools Thread

Sat Nov 21, 2009 12:16 am

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/

Who is online

Users browsing this forum: No registered users and 5 guests