CONNEXION TELNET AUTOMATIQUE
djilato
Messages postés
22
Statut
Membre
-
smed_79 Messages postés 1291 Date d'inscription Statut Contributeur Dernière intervention -
smed_79 Messages postés 1291 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
j'ai faire une connexion quotidien
ip: 192.168.2.3
USER : DJILATO
PASSWORD: DJLT
je veut crier un fichier .bat pour connecter avec un double click
merci!
j'ai faire une connexion quotidien
ip: 192.168.2.3
USER : DJILATO
PASSWORD: DJLT
je veut crier un fichier .bat pour connecter avec un double click
merci!
A voir également:
- Bat telnet
- Creer un fichier .bat - Guide
- Bat to exe - Télécharger - Édition & Programmation
- .Bat mac ✓ - Forum MacOS
- Reboot bat - Forum Programmation
- Net use bat - Forum Réseau
6 réponses
alors j'trouver se script la connexion pas tribien mis le problem que apre exécution il supprim tout les fichier .bat et .txt ?
@rem *******************************************
@rem * Auto-Connexion en Telnet sur la iTgate *
@rem * Date : 21/03/2006 *
@rem * Auteur : f4bian *
@rem * Forums : http://www.itgateusers.com *
@rem *******************************************
@rem ////// Editez les elements ci dessous concernant votre materiel
@set tgateboxip=192.168.0.3
@set tgateusername=username
@set tgatepassword=tpassword
@set tgatecommand1=
@set tgatecommand2=
@set tgatecommand3=
@set tgatecommand4=
@set tgatecommand5=
@rem ///// Ne plus rien modifier en dessous de cette ligne !
@rem ///// Creation du script VBS pour connexion automatique
@echo set sh=WScript.CreateObject("WScript.Shell")>>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgateusername%">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatepassword%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@rem ///// Lancement des commandes Telnet
@echo sh.SendKeys "%tgatecommand1%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand2%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand3%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand4%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand5%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@rem ///// Lancement de la session Telnet sur l'iTgatebox
@start /realtime telnet.exe %tgateboxip%
@cscript //nologo telnet.vbs
@del /q telnet.vbs
@rem *******************************************
@rem * Auto-Connexion en Telnet sur la iTgate *
@rem * Date : 21/03/2006 *
@rem * Auteur : f4bian *
@rem * Forums : http://www.itgateusers.com *
@rem *******************************************
@rem ////// Editez les elements ci dessous concernant votre materiel
@set tgateboxip=192.168.0.3
@set tgateusername=username
@set tgatepassword=tpassword
@set tgatecommand1=
@set tgatecommand2=
@set tgatecommand3=
@set tgatecommand4=
@set tgatecommand5=
@rem ///// Ne plus rien modifier en dessous de cette ligne !
@rem ///// Creation du script VBS pour connexion automatique
@echo set sh=WScript.CreateObject("WScript.Shell")>>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgateusername%">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatepassword%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@rem ///// Lancement des commandes Telnet
@echo sh.SendKeys "%tgatecommand1%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand2%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand3%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand4%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@echo sh.SendKeys "%tgatecommand5%">>telnet.vbs
@echo sh.SendKeys "~">>telnet.vbs
@echo WScript.Sleep 500>>telnet.vbs
@rem ///// Lancement de la session Telnet sur l'iTgatebox
@start /realtime telnet.exe %tgateboxip%
@cscript //nologo telnet.vbs
@del /q telnet.vbs
essaye ca alors
fichier transfert.cmd :
ftp.exe -v -i -s:C:\ParametreFTP.txt
fichier parametreFTP.txt :
open 192.168.2.3
DJILATO
DJLT
"tu peut mettre a la suite les commande que tu souhaite faire"
fichier transfert.cmd :
ftp.exe -v -i -s:C:\ParametreFTP.txt
fichier parametreFTP.txt :
open 192.168.2.3
DJILATO
DJLT
"tu peut mettre a la suite les commande que tu souhaite faire"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Le client Telnet MS ne le permet pas. Essaie avec un autre client comme Putty.
je suis la pour apprendre plus que pour résoudre un probleme !
putty.exe -ssh -2 -P 22 user@adresse_IP -pw password -m commande_telnet.txtle fichier commande_telnet.txt contient les commandes qu'on veut exécuter après une identification (telnet) réussie, par exemple: ( ls > temp.txt)
PuTTY Link: command-line connection utility
Release 0.53
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-v show verbose messages
-load sessname Load settings from saved session
-ssh -telnet -rlogin -raw
force use of a particular protocol (default SSH)
-P port connect to specified port
[b]-l user[/b] connect with specified username
-m file read remote command(s) from file
-batch disable all interactive prompts
The following options only apply to SSH connections:
[b]-pw passw login with specified password[/b]
-L listen-port:host:port Forward local port to remote address
-R listen-port:host:port Forward remote port to local address
-X -x enable / disable X11 forwarding
-A -a enable / disable agent forwarding
-t -T enable / disable pty allocation
-1 -2 force use of particular protocol version
-C enable compression
-i key private key file for authentication
je suis la pour apprendre plus que pour résoudre un probleme !
Merci