Putty portable single file4/30/2024 ![]() ![]() The KiTTY is a GUI application (it's a clone of PuTTY). echo usrun -u root rush>input.txtĪlternatively use KiTTY with its -cmd switch that does what you want. And anyway, the Plink is the tool to automate tasks, not PuTTY. ![]() So you can redirect even a password or subcommands of the primary command from a file, as if you have typed them on a console. As such it can use input/output redirection. It's a tool from PuTTY package that works like PuTTY, but it is a console, not GUI, application. Having that said, you can use Plink (PuTTY command-line connection tool) instead of PuTTY. It's actually an identical problem to the password input problem above.Ĭontrary to the password problem, with subcommands the primary command may have another mechanism to provide them instead of using input. If not, you can always use your server/shell-specific way to execute multiple commands on a single line like: command1 & command2īut if the further commands are actually subcommands of the first command, what is the case with commands like su, sh, bash, ssh, ftp, etc (and might be the case with the usrun), the further commands are actually an input to the first, not standalone commands of the top-level environment/shell. Though note that not all SSH servers do support multiple lines. If all commands you want to execute are to be executed in the same environment/shell, you can put them to the commands.txt line by line. Always check if there is a better (=safer) way.Īnother issue are further commands. In general, whenever your are trying to automate password typing, you are doing things wrong. I do not know the usrun, so I cannot tell if it has a way to "authenticate" any other method instead by "typing" a password. Where the commands.txt would contain usrun -u root rushīut this won't help you with the password as that's an input to the usrun command, not a command on its own, so the -m is useless here. To execute commands automatically using PuTTY, use the -m switch to pass a text file with the command(s) to run, like: putty.exe -ssh -m commands.txt ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |