plink

Executing command in Plink from a batch file

你。 提交于 2019-12-23 05:48:09
问题 I want to automate the export process which I take using expdp command in Oracle. Following is the contents of batch file I have created to open PuTTY. @echo off "C:\Program Files\PuTTY\plink.exe" username@Ip_Addr -pw password -m Open_Putty.txt` Following is the contents of Open_Putty.txt to execute different commands. echo $ORACLE_SID; Read oraenv; But after opening Open_Putty.bat it disappears without showing any output. Please help me with this. I want to set oraenv and run some more

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

♀尐吖头ヾ 提交于 2019-12-23 03:01:39
问题 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

Automate mysqldump to local Windows computer

℡╲_俬逩灬. 提交于 2019-12-22 12:37:11
问题 I'm trying to use plink on Windows to create a tunnel to a Linux machine and have the dump file end up on the Windows machine. It would appear that this answer would work and is the basis of my question. But trying it out and looking at other answers I find that the dump file is still on the Linux machine. I'm trying this out in my local environment with Windows and Ubuntu 14.04 before moving to production. In Windows 8.1: plink sam@192.168.0.20 -L 3310:localhost:3306 mysqldump --port=3310 -h

After the upgrade to TortoiseGit v1.8.15.0 and Git v2.5.0 hosts cannot be found

旧时模样 提交于 2019-12-17 21:00:21
问题 I've just updated my TortoiseGit from v1.7.* to v1.8.15.0 and Git from 1.* to v2.5.0.windows.1 . Now trying to perform a remote operation like pull I'm getting errors: git.exe pull -v --progress "origin" Unable to open connection: Host does not existfatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. git did not exit cleanly (exit code 1) (1747 ms @ 19.08.2015 18:43:33) I changed the SSH client setting from

Testing using Plink.exe to connect to SSH in C#

心不动则不痛 提交于 2019-12-17 19:55:19
问题 Im trying to connect to a unix terminal via plink.exe. The goal is so that I can read the text back into a string. My dilema is that the bank I work for uses an old as400 type system that we normally access through putty. I'm trying to develop an automation suite that will interface with the system and run jobs and analyse the outputs etc. So I figured I'd use plink through C#. If I run the code via Command prompt I get (roughly) the text I need back. However im suffering a problem in my C#

Run shell script (with parameters) on Windows command line via Plink

我是研究僧i 提交于 2019-12-17 07:39:12
问题 I need to execute a shell script remotely inside the Linux box from Windows #!/bin/bash if [ "$#" -ne 1 ]; then echo "Illegal number of parameters" exit fi echo "$1" Here is the command I ran from Windows command prompt cmd> plink.exe -ssh username@host -pw gbG32s4D/ -m C:\myscript.sh 5 I am getting output as "Illegal number of parameters" Is there any way I can pass command line parameter to shell script which will execute on remote server? 回答1: You misunderstand how the -m switch works. It

problem executing plink(putty) command

浪子不回头ぞ 提交于 2019-12-14 02:22:40
问题 I am using Plink to execute remote command: When using this from cmd prompt in single line it doesnot work: C:\>c:\plink.exe -l userId -pw psw -m C:\goto\test.bat remote_host It says unable to open command file "C:\goto\test.bat" But The following works: C:\>c:\plink.exe -l userId -pw psw remote_host C:\>C:\goto\test.bat Please help. 回答1: Try running it like this: c:\plink.exe -l userId -pw psw remote_host C:\goto\test.bat 回答2: Judging by some documentation, this should work: C:\>c:\plink.exe

Login syntax for plink using ip, username, and password

心已入冬 提交于 2019-12-13 09:47:26
问题 I'm trying to connect to a VM through the command line using plink with this syntax: plink -v "123.123.12.100 -l user -pw pass" But I keep getting this Looking up host "123.123.12.100-luser-pwpass" Unable to open connection: Host does not exist When I just run plink with the ip address, I am able to login with my credentials. I've looked around and the common solution is to check to see if PuTTY has default settings because then plink will use those, but there are no default settings, so it

Plink is not returning to command prompt when executing start_http

泪湿孤枕 提交于 2019-12-12 02:14:07
问题 I'm executing a command using Plink through a Perl file from a Windows machine. system("cmd /c c:\\plink.exe -batch -ssh -l $user_name @ $host_name -pw $pwd start_http"); Execution is hanging. When I execute the same command from command prompt, Plink is not returning to command prompt. Tried using & at the end of the command but no use. And I don't want to redirect output to any log file. Whereas "stop" command is working fine system("cmd /c c:\\plink.exe -batch -ssh -l $user_name @ $host

How does PUTTY/PLINK determine a command has returned?

南笙酒味 提交于 2019-12-12 01:31:32
问题 Is it newline? prompt? What exactly? Trying to run powershell over plink and the command executes but plink doesn't recognise its finished and the session hangs. Most curiously though, the command executes successfully when sent through the shell (via Putty). However, when sent via plink, the same command hangs... Any ideas? 回答1: Telnet is nearly a raw TCP connection. All Putty needs back is a response from the server. The rest is controlled by the shell and SSH/Telnet server. While your task