putty

Run Unix commands using PuTTY in C# [duplicate]

天涯浪子 提交于 2019-12-07 20:36:57
问题 This question already has answers here : Automating running command on Linux from Windows using PuTTY (9 answers) Closed 4 years ago . I am trying to run Unix commands in PuTTY using C#. I have the below code. But the code is not working. I am not able to open PuTTY. static void Main(string[] args) { Process cmd = new Process(); cmd.StartInfo.FileName = @"C:\Windows\System32\cmd"; cmd.StartInfo.UseShellExecute = false; cmd.StartInfo.RedirectStandardInput = false; cmd.StartInfo

How to call and execute a shell script using PuTTY from VBA macro

非 Y 不嫁゛ 提交于 2019-12-07 07:15:26
I am trying to write a VBA macro which will login using PuTTY and execute commands. The below code has been used. Sub open_putty() Dim UserName 'assign user name Dim Passwrd 'assign password Dim TaskID As Long UserName = "user name" Passwrd = "password" pc1 = "C:\Program Files (x86)\PuTTY/putty.exe -ssh " & UserName & "@ip address -pw " & Passwrd pc2 = "putty.exe -m ""C:\Temp\emu.sh""" TaskID = Shell(pc1, 1) TaskID = Shell(pc2, 1) End Sub Script throws an error saying 'Run-time error '53' - File not found'. Please help. You have to quote the path to PuTTY, as it contains spaces. Also you

Keep play application running after putty terminal closed

£可爱£侵袭症+ 提交于 2019-12-07 02:37:30
How to keep play application running after putty terminal closed? After deploying play application in to server, I ssh'ed into server with putty terminal and ran the play application. However, once I close the putty terminal, play application no longer accepts http requests from client. To start the play application I used following command; ./{myplayapp}/bin/{executable} -Dhttp.port=8000 use screen to start your application. view existing screens with "screen -ls" and switch between them with "screen -r" http://wiki.ubuntuusers.de/screen I would recommend nohup : nohup ./script -Dhttp.port

How to ssh into openshift app using the 'rhc' command on windows?

为君一笑 提交于 2019-12-07 02:28:53
问题 I am trying to ssh (from windows) into my Openshift app using the 'rhc' command rhc app-ssh <app name> I have followed the Openshift instruction here: https://www.openshift.com/forums/openshift/how-to-rhc-app-ssh-command Putty is returning the error "Putty Command Line Error: unknown option "-V" and then fails. My google searches indicate putty has a "-v" (lowercase) option for turning on Verbose. I'm not sure if it's one in the same. If I use the Putty GUI everything works fine. I would like

Execute Unix commands using putty in C# [duplicate]

孤人 提交于 2019-12-06 15:43:18
This question already has answers here : Automating running command on Linux from Windows using PuTTY (9 answers) Closed last month . Hi I have the below code, I am able to open putty session but i was not able to give the inputs using C# , i have tried using process.StandardInput.WriteLine but it is not working . Please help me. class Program { static void Main(string[] args) { Process process = new Process(); process.StartInfo.FileName = @"C:\Users\win7\Desktop\putty.exe"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardInput = true; process.StartInfo

putty免密登录

不羁的心 提交于 2019-12-06 14:23:45
1.打开生成密钥的工具(在搜索栏里搜索putty),点击Run PuTTYgen 2.点击Generate生成密钥 2.点击save private key 保存私钥 3.将公钥复制到所需登录的虚拟机上的~/.ssh/authorized_keys中 4.如果虚拟机上还没有~/.ssh/authorized_keys的话则手动创建 5.设置权限 chmod 700 ~/.ssh/ chmod +x ~/.ssh/authorized_keys 6.登录时记得在这里加上私钥保存的路径 7.结束。 来源: https://www.cnblogs.com/lyz-2019-12-05/p/11989657.html

使用PuTTY进行KEY认证

天涯浪子 提交于 2019-12-06 13:39:38
下面以Windows环境下PuTTY为例讲解使用KEY认证的方法,Linux/UNIX下与此类似,服务器端环境为OpenBSD。 首先,从下面的网址下载PuTTY的安装包(for Windows): http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe 下完后双击安装,不再赘述。这个软件包自带了下面几个非常实用的软件: PuTTYgen:生成KEY; Pageant:管理KEY; PuTTY:SSH客户端; PSFTP:使用SSH上传/下载文件。 下面就来实例讲解用PuTTY的这几个软件对远程主机进行KEY认证和管理的方法。假设我们要在192.168.0.132这个远程主机上使用young_king这个用户名进行KEY认证和登录。 1.生成KEY 启动PuTTYgen,如下图: 在密钥长度栏输入想要的密钥长度,越大越安全。这里以最大的2048位为例,然后点“Generate”按钮,会开始生成KEY,生成过程中需要在下面的空白部分移动鼠标来生成随机数。 KEY生成完毕后,你可以输入一些标识信息,如下图: 还可以在下面的passphrase框内输入“保护码”,注意要输入两遍。“保护码”也就是密码的意思,用来保密私钥的,一定要记住这个哦! 都输入完毕后,点击下面的“Save public key

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

tail -f using PuTTY hangs

岁酱吖の 提交于 2019-12-06 09:41:08
I am using PuTTY command line to connect to a server and tail a log file. On local machine I've created a file "tail-exec" which contains following text: tail -f /var/log/test.log I am starting putty through command line as: putty -ssh -t -pw -m tail-exec user@server This opens up the terminal window with log tail. But the problem is that this terminal hangs after there are few hundred lines added to the log. If I open putty manually, and then run the tail command from the bash prompt, then it is not hanging for thousands of lines also. I've tried using following text in tail-exec file, but

开源龙芯loongson智龙主板V2.0程序putty登录、交叉编译、Series连接、telnet连接使用、DNS开启ping通

为君一笑 提交于 2019-12-06 08:04:29
交叉编译:在x86 CPU环境下编译适用于MIPS CPU架构的二进制程序 所需环境:x86(32位)linux系统【注意,一定得是32位的,不然无法使用提供的32位mips交叉编译程序。而且,智龙上的芯片也是32位的。之前安装64位的结果编译出来的程序也是64的,造成运行失败】 编译好的程序通过USB线连接,通过putty使用Series模式登录到龙芯智龙的linux操作系统: 设置上注意Flow Control和通讯Speed为115200 这里给出一个benchmark程序: #include <stdio.h> #include <sys/time.h> #include <unistd.h> int main(){ int t, len1, len2; len1 = 181000000; len2 = 81000000; struct timeval start, end; gettimeofday( &start, NULL ); for(t=0;t<len1;t++); gettimeofday( &end, NULL );printf("%d times Empty loop need: %d us (%.3f ms)\n", len1, (int) (1000000*(end.tv_sec-start.tv_sec)+end.tv_usec-start.tv