plink

Cannot compile PuTTY, Plink or Pscp on Windows due to missing Windows/MSVC subdirectory

安稳与你 提交于 2019-12-08 03:49:36
问题 I need to download and compile plink/pscp on my Windows. Since I need specific version (0.69), I searched for the tag, and checked out to that commit. In putty readme, they write that if I want to compile on windows, there is Visual studio solution: Inside the windows/MSVC subdirectory are MS Visual Studio project files for doing GUI-based builds of the various PuTTY utilities. These have been tested on Visual Studio 7 and 10. You should be able to build each PuTTY utility by loading the

Plink handling specific error through Windows batch file

不打扰是莪最后的温柔 提交于 2019-12-08 03:13:43
问题 I'm trying to decipher how I would go about trying to capture some error handling in my Windows batch script for a return code from my Plink command such as "Access Denied" from a server which means I do not have access to it thus meaning I need to gain access to it. Here is the code: @echo on SET userid=root SET passwd=Welcome1%% for /f "delims=" %%i in ('type "ipaddress.txt" ') do ( pushd "C:\Program Files (x86)\PuTTY" echo(======================================== plink.exe -pw %passwd%

How to execute multiple commands sequentially on device in Windows batch file using PuTTY/Plink?

旧街凉风 提交于 2019-12-08 02:05:46
问题 I am trying to configure a device over SSH in a automated way using a .bat script. In the snippet below I am generating a file with the required commands in the correct order, afterwards I execute/read the file into the SSH connection using plink . This results in a error message the the commands are unknown, I think this is caused by the fact that the commands are not executed one by one but the entire file is inserted. Does anyone have a idea how I can execute multiple commands sequentially

Copying contents of .NET build folder to Ubuntu server using Plink

对着背影说爱祢 提交于 2019-12-07 11:36:31
I'm building a pre-deploy script in PowerShell that creates a production build of my .NET Core Web Api application and then SSHs into my Ubuntu Digital Ocean Droplet via SSH key. I'm currently at a stage where I create the build, copy the build folder using Copy-Item , SSH into my server and then this is where I'm completely stuck. I know that I can run BASH commands from my PowerShell script because I've tried some basic operations like creating and deleting a directory, I can cd in and out of directories. I've tried storing the copied .NET build folder in memory as a variable: $build = Copy

PowerShell script to pass SecureString to Plink as account and sudo passwords

≡放荡痞女 提交于 2019-12-07 08:00:31
I'm trying to use Powershell (in order to be able to mask the password) to run Plink command on remote Linux machine to give top 20 directories under /opt... It connects, password is properly masked but no results Write-output shows the assembled command string is correct... but it just appears to hang and does not return results. could the it be that the write-output results is different than what plink actually sends? When I copy the write-output to cmd prompt and directly run it, it works (well it still requests the password a second time because of sudo, but it does work and returns the

What does CreateFile(“CONIN$” ..) do?

会有一股神秘感。 提交于 2019-12-07 00:05:27
问题 I was hacking away the source code for plink to make it compatible with unison. If you don't know, unison is a file synchronization tool, it runs an "ssh" command to connect to a remote server, but there's no ssh.exe for windows; there's plink, which is very close but not close enough (it doesn't behave like unison expects it to), so people usually make wrappers around it, like this one. one of the problems is that unison expects the password prompt to print to stderr (but plink prints it to

Wait between sending login and commands to serial port using Plink

孤街醉人 提交于 2019-12-06 16:52:47
I want to make connection by serial port in PLINK . The problem is that the code (below) doesn't work because file remove.txt is all sent at once, while terminal is asking for a login and before it starting asking for commands. There is any possibilities to login first and then execute command file? The test is saved serial session (com5 baud 115200) Command: C:\PROGRA~1\PuTTY\plink -load test < C:\Users\qj2p70\Desktop\remove.txt remove.txt file: root root cd /cfg_usr/delphi/etc rm vip_coding_yes If I understand correctly, the problem is that the device on the serial port discards an input

Plink returning unwanted characters via C#

隐身守侯 提交于 2019-12-06 12:13:14
I am getting unwanted characters before and after my results when using Plink via C#: Command: ls -l */informatica/tgtdynamicparams*.out | grep vaulttest| grep 'Sep 1'|awk '{print $9}' | sort Linux result: aaco/informatica/tgtdynamicparams2269885_CHECK_REF_COMPANY.out cdph/informatica/tgtdynamicparams2225704_CDPHDRUGRECON.out cdph/informatica/tgtdynamicparams2225704_CDPHELIGRECON.out merh/informatica/tgtdynamicparams3454321_OPEN_TEST.out merh/informatica/tgtdynamicparams3454322_OPEN_TEST2.out C# via Plink result: [01;32mcdph/informatica/tgtdynamicparams2225704_CDPHDRUGRECON.out[0m [01;32mcdph

Emacs + tramp + plink

扶醉桌前 提交于 2019-12-06 11:32:09
问题 I'm trying to get emacs tramp running under Windows XP to work over putty plink on an Amazon EC2 instance. The documentation for doing this is sparse. I can find partial documentation, but none that addresses all the steps required to get this working. Can anyone provide a walk through, or a pointer to a walk through? 回答1: (add-to-list 'load-path (expand-file-name "C:/tools/emacsw32/emacs/lisp/tramp/lisp")) (require 'tramp) ;(setq tramp-chunksize "500") (setq tramp-default-method "plink")

Executing (sudo) subcommands using Plink

核能气质少年 提交于 2019-12-06 11:23:35
I am trying to command Linux machine from Window PowerShell. The commands are dependent on the fail/pass of the commands before. Therefore, I have to put all the commands together. I have tried multiple ways of putting commands together but at the ends I only receive the output of the first command. PS C:\Users\sams> plink -ssh -l username -pw root username@10.223.26.34 -t "sudo -i && cd /root/docker/storm-supervisor/ && ./stop-all.sh" The actual result: Only receives the output of the first command. Expected result: Receives output of the final command. sudo -i && cd /root/docker/storm