Plink

From My Mnemonic Rhyme
Jump to navigation Jump to search

Links

Hints

Using Plink in batch files and scripts

Once you have set up Plink to be able to log in to a remote server without any interactive prompting (see section 7.2.2), you can use it for lots of scripting and batch purposes. For example, to start a backup on a remote machine, you might use a command like:

plink root@myserver /etc/backups/do-backup.sh

Or perhaps you want to fetch all system log lines relating to a particular web area:

plink mysession grep /~fred/ /var/log/httpd/access.log > fredlog

Plink Tunnel

Um nun einen Tunnel zu einem anderen Rechner mit Hilfe eines Dritten aufzubauen, kann man folgende Zeile benutzen

plink.exe -v -pw geheim nutzername@tunnelserver -L 10119:zielserver.de:119

Plink Usage

Für den Shutdown des Unix Servers:

Test-Befehl:
C:\plink.exe root@192.168.179.111 -pw "0915" touch /root/test

Shutdown:
C:\plink.exe root@192.168.179.111 -pw "0915" init 0