Leser: 1
10 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10
my $befehl = "C:\putty\pscp.exe -i \"C:\mykey.ppk\" -v -batch \"testuser\@192.168.3.24:/home/otheruser/information.txt\" \"D:\import\" 1>> D:\\import\\log.txt 2>>&1"; if(system($befehl)) { print "Datei <information.txt> konnte nicht übertragen werden! -\n"; system("C:\putty\plink.exe -ssh -batch -i \"C:\mykey.ppk\" testuser\@192.168.3.24 \"mv /home/otheruser/information.txt /home/otheruser/ERR_information.txt\""); } else { system("C:\putty\plink.exe -ssh -batch -i \"C:\mykey.ppk\" testuser\@192.168.3.24 \"rm /home/otheruser/information.txt\""); }
1 2 3 4 5 6 7 8 9 10
my $befehl = 'C:\putty\pscp.exe -i "C:\mykey.ppk" -v -batch "testuser\@192.168.3.24:/home/otheruser/information.txt" "D:\import" 1>> D:\\import\\log.txt 2>>&1'; if(system($befehl)) { print "Datei <information.txt> konnte nicht übertragen werden! -\n"; system('C:\putty\plink.exe -ssh -batch -i "C:\mykey.ppk" testuser\@192.168.3.24 "mv /home/otheruser/information.txt /home/otheruser/ERR_information.txt"'); } else { system('C:\putty\plink.exe -ssh -batch -i "C:\mykey.ppk" testuser\@192.168.3.24 "rm /home/otheruser/information.txt"'); }
renee+2008-10-30 08:33:14--Die System-Befehle stehen in Single-Quotes, das mit den \ dürfte also nicht das Problem sein.
@Aendrew: Warum nimmst Du nicht Net::SCP?
Aendrew+2008-10-30 09:56:19--Hallo renee,
nein, mein Befehl steht nicht in Single-Quotes.
QuoteAber eigene Perl-Module darfst Du dort installieren? Manchmal verstehe ich Unternehmen nicht *kopfschüttel*Der Grund warum ich nicht das Modul Net::SCP verwende liegt darin, dass ich auf dem Server keine Software installieren darf. (plink und pscp hab ich nur kopiert)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Looking up host "192.168.3.24"
Connecting to 192.168.3.24 port 22
Server version: SSH-2.0-OpenSSH_4.2
We claim version: SSH-2.0-PuTTY_Release_0.60
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1024 80:c5:8f:44:74:72:1c:8c:7b:b5:72:6f:f7:35:87:b9
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "C:\mykey.ppk"
Using username "rrdexport".
Offered public key
Offer of public key accepted
Authenticating with public key "dsa-key"
Access granted
Opened channel for session
Started a shell/command
information.txt | 32 kB | 32.0 kB/s | ETA: 00:00:07 | 12%
information.txt | 260 kB | 260.1 kB/s | ETA: 00:00:00 | 100%
Using SFTP
Connected to 192.168.3.24
Sent EOF message
Server sent command exit status 0
Disconnected: All channels closed
-e "Fehler bei Datei <information2.txt> um Thu Oct 30 10:18:06 2008\n"
Looking up host "192.168.3.24"
Connecting to 192.168.3.24 port 22
Server version: SSH-2.0-OpenSSH_4.2
We claim version: SSH-2.0-PuTTY_Release_0.60
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1024 80:c5:8f:44:74:72:1c:8c:7b:b5:72:6f:f7:35:87:b9
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "C:\mykey.ppk"
Using username "rrdexport".
Offered public key
Offer of public key accepted
Authenticating with public key "dsa-key"
Access granted
Opened channel for session
Started a shell/command
information.txt | 32 kB | 32.0 kB/s | ETA: 00:00:07 | 12%
information.txt | 260 kB | 260.1 kB/s | ETA: 00:00:00 | 100%
Using SFTP
Connected to 192.168.3.24
Sent EOF message
Server sent command exit status 0
Disconnected: All channels closed
10 Einträge, 1 Seite |