Putty

Fermé
Maïwenn - 17 juin 2004 à 11:50
onesdf Messages postés 375 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 17 octobre 2008 - 3 juin 2008 à 18:54
Bonjour tout le monde,
J'utilise Putty avec le protocole SSH en ligne de commande afin de me connecter à distance sur un ordinateur, et je voudrais utilisée la commande -m, qui permet de lancer une commande sur l'ordinateur distant : _m commande.txt, où 'commande' est le fichier qui stocke la commande à réaliser. Mais, çà ne fonctionne pas? Pouvez-vous m'aider?
Merci d'avance,
Maïwenn.

2 réponses

avrelbct Messages postés 311 Date d'inscription mardi 20 mars 2007 Statut Membre Dernière intervention 17 février 2011 55
3 juin 2008 à 16:39
J'ai lu dans leur doc que cette commande n'est pas compatible avec tous les serveurs...j'ai le même problème et je pense que ça vient de là...


"3.8.3.6 -m: read a remote command or script from a file

The -m option performs a similar function to the ‘Remote command’ box in the SSH panel of the PuTTY configuration box (see section 4.18.1). However, the -m option expects to be given a local file name, and it will read a command from that file.

With some servers (particularly Unix systems), you can even put multiple lines in this file and execute more than one command in sequence, or a whole shell script; but this is arguably an abuse, and cannot be expected to work on all servers. In particular, it is known not to work with certain ‘embedded’ servers, such as Cisco routers.

This option is not available in the file transfer tools PSCP and PSFTP. "
0
onesdf Messages postés 375 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 17 octobre 2008 120
3 juin 2008 à 18:54
Bonsoir,

Tu peux utiliser plink comme ceci :

plink.exe hote -l user -pw mot_de_passe commande

EDIT : Merci d'avoir remonté un post de 2004 ...
0