putty

How to send commands to putty

牧云@^-^@ 提交于 2019-12-18 09:34:56
问题 I'm writing a simple executable in C that needs to open a putty session and send commands to it, then close putty. I can open/close the putty session (i'm not that bad) but i'm not too sure on how to send putty the commands. Any ideas?? 回答1: From the PuTTY FAQ: How can I use PuTTY to make an SSH connection from within another program? Probably your best bet is to use Plink, the command-line connection tool. If you can start Plink as a second Windows process, and arrange for your primary

Use Plink to execute command (Oracle SQL query) on remote server over SSH

让人想犯罪 __ 提交于 2019-12-18 07:24:42
问题 Currently I'm doing this: start putty.exe , input remote server IS and select SSH login, then input server username and password. Then I have to enter sqlplus to enter into database, next I put database user and password and run select query. Get output logs on my PC. I want to automate the process using Plink or any other tool. 回答1: As you already know, you can use plink (from PuTTY package) to automate remote command execution. The plink has the command-line switch -m , that you use to

Is it possible to send the content of text file over PuTTY over a serial port?

China☆狼群 提交于 2019-12-18 06:14:12
问题 I'd like to send the text content of a file over the serial port, over PuTTY. I know that extensions exists such as Xmodem and Zmodem, but they all use some checksum protocols to confirm that a file is sent over the port. However, my requirements are more simple. I'd like to simply send a bunch of text (in a file) over the serial port in Windows (under Linux this would be must more simple), but my preferred terminal program is PuTTY. Is this possible? Is there another terminal program that

Is it possible to send the content of text file over PuTTY over a serial port?

给你一囗甜甜゛ 提交于 2019-12-18 06:14:10
问题 I'd like to send the text content of a file over the serial port, over PuTTY. I know that extensions exists such as Xmodem and Zmodem, but they all use some checksum protocols to confirm that a file is sent over the port. However, my requirements are more simple. I'd like to simply send a bunch of text (in a file) over the serial port in Windows (under Linux this would be must more simple), but my preferred terminal program is PuTTY. Is this possible? Is there another terminal program that

Convert PEM to PPK file format

房东的猫 提交于 2019-12-17 21:39:08
问题 Is there a way to convert PEM files to PPK files? (you may guess that Amazon EC2 gives me a PEM file, and I need to use the PPK format for SSH connectivity). 回答1: Use PuTTYGen Creating and Using SSH Keys Overview vCloud Express now has the ability to create SSH Keys for Linux servers. This function will allow the user to create multiple custom keys by selecting the "My Account/Key Management" option. Once the key has been created the user will be required to select the desired SSH Key during

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#

Best way to script remote SSH commands in Batch (Windows)

时光总嘲笑我的痴心妄想 提交于 2019-12-17 15:37:52
问题 I am looking to script something in batch which will need to run remote ssh commands on Linux. I would want the output returned so I can either display it on the screen or log it. I tried putty.exe -ssh user@host -pw password -m command_run but it doesn't return anything on my screen. Anyone done this before? 回答1: The -m switch of PuTTY takes a path to a script file as an argument, not a command . Reference: https://the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter3.html#using-cmdline-m So

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

使用 putty 免密码 ssh 登录 mac os

烈酒焚心 提交于 2019-12-16 12:12:53
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> mac 上的准备 在 系统偏设置 窗口中点击 共享 图标,进入共享设置界面 在左边的服务列表中选中 远程登录 生成公钥和私钥 如果有的话,跳过 如果没有,这里使用 PuTTY key Generator 来生成 在 mac 上配置公钥 这里使用 ssh 客户端 PuTTY 通过账号密码连接 mac,登录成功后在**~**目录创建 .ssh 文件夹,文件夹下面再创建 authorized_keys 文件,然后将公钥字符串复制到该文件中保存 在 PuTTY 中配置私钥和登录用户名 打开 PuTTY Configuration ,进入 Connection->SSH->Auth,在 Private key file for authentication 文件选择框选中上面保存的私钥文件 在 Connection->Data 的 Auto-login username 文本框输入登录用户名 最后不要忘记在 Session 节点点击 Save 按钮 来源: oschina 链接: https://my.oschina.net/u/100592/blog/801456

MySQL Server Refusing Local Connections Over SSH Tunnel

99封情书 提交于 2019-12-14 03:58:14
问题 I have a remote Windows server with MySQL and Cygwin (enabling remote SSH connections). When I connect from a local instance of Workbench (i.e. with Workbench handling the tunnel), via SSH as root, I have no problem connecting to the remote database. I have a need to set up my own tunnel because I have another app that needs MySQL access. I chose to use Putty, and had only partial success. I can connect (using Workbench as a test client) through my tunnel, localhost:3307, which I have