edumanilha Posted January 23, 2020 Share Posted January 23, 2020 When I try to send a Linux command the "/" dont appear... /Etc/init.d/nfcepack_agente stop and start... First the script call Putty, allready with user and password, then I try to send the stop , start command. But thats what happens...attached Photo....First command erase everything before "fcepack..." Second command trade the "/" for "^[" ... Looks like this because I removed the {ENTER} between commands...I tried to set the command as a variable and by Just send and quotes... thanks in advance! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2020 Developers Share Posted January 23, 2020 Have you tried to send the info raw? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AdamUL Posted January 23, 2020 Share Posted January 23, 2020 Try using Plink, instead of PuTTY? Adam Link to comment Share on other sites More sharing options...
SlackerAl Posted January 23, 2020 Share Posted January 23, 2020 (edited) Without any code to look at it is very difficult to help: I suggest you write a short replicator of your problem using a standard Linux command so anyone with telnet access to a Linux box can test the code. However, this thread contains all the basic information required to make a telnet connection (check the plink reference as well). Edited January 23, 2020 by SlackerAl Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
edumanilha Posted January 23, 2020 Author Share Posted January 23, 2020 1 hour ago, Jos said: Have you tried to send the info raw? Jos Hello! How can I do this? Link to comment Share on other sites More sharing options...
edumanilha Posted January 23, 2020 Author Share Posted January 23, 2020 1 hour ago, AdamUL said: Try using Plink, instead of PuTTY? Adam Um trying to do our job easier, and everybody use putty to connect...the lazy fellas Will not download other Program... Link to comment Share on other sites More sharing options...
edumanilha Posted January 23, 2020 Author Share Posted January 23, 2020 1 hour ago, SlackerAl said: Without any code to look at it is very difficult to help: I suggest you write a short replicator of your problem using a standard Linux command so anyone with telnet access to a Linux box can test the code. However, this thread contains all the basic information required to make a telnet connection (check the plink reference as well). I Just sent: /etc/init.d/nfcepack_agente stop and start Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2020 Developers Share Posted January 23, 2020 10 minutes ago, edumanilha said: Hello! How can I do this? That's why a helpfile is supplied so you can have a look Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
edumanilha Posted January 23, 2020 Author Share Posted January 23, 2020 3 hours ago, Jos said: Have you tried to send the info raw? Jos Lol...Sorry! Raw did the same thing...."fcepack_agente" deleted everything before this.... Link to comment Share on other sites More sharing options...
edumanilha Posted January 23, 2020 Author Share Posted January 23, 2020 2 hours ago, Jos said: That's why a helpfile is supplied so you can have a look Jos I tried to use -m comandos.txt on the end of the putty open comand... But I get a "unable to open command file "comando.txt"" Inside the comando.txt = /etc/init.d/nfcepack_agente stop Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted January 24, 2020 Share Posted January 24, 2020 Plink is the command driven part of Putty its not a separate program, it should pretty much come with the same download/install, and it would be what you use for your automation, not a change in program for the person(s) to use for interactive sessions. I have not used this in a while, but had it working with my firewall and access points at home and wrapped it into a AutoIT GUI for a control panel. Dont forget you still have telnet on Windows CMD and even Linux on Windows 10 you can make use of, though I would prefer SSH if this is anything more than a lab environment. Link to comment Share on other sites More sharing options...
edumanilha Posted January 30, 2020 Author Share Posted January 30, 2020 (edited) On 1/24/2020 at 10:09 AM, ViciousXUSMC said: Plink is the command driven part of Putty its not a separate program, it should pretty much come with the same download/install, and it would be what you use for your automation, not a change in program for the person(s) to use for interactive sessions. I have not used this in a while, but had it working with my firewall and access points at home and wrapped it into a AutoIT GUI for a control panel. Dont forget you still have telnet on Windows CMD and even Linux on Windows 10 you can make use of, though I would prefer SSH if this is anything more than a lab environment. $CMD = "C:\putty -ssh -pw password user@" & $Final & " -m " & @ScriptDir & "\RESTARTFISCAL.txt" worked for me! Thanks guys! Edited January 30, 2020 by edumanilha Link to comment Share on other sites More sharing options...
edumanilha Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) I'll start a new topic, thanks! Edited February 14, 2020 by edumanilha Starting another post Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now