putty

Why would SSH commands through Putty work differently to those via PHP's phpseclib?

点点圈 提交于 2019-12-01 02:23:43
I'm writing a script to automate deployment from my windows development PC to a shared hosting server. I am getting different results depending on whether I execute the commands via Putty or PHP (both running on my PC) . In putty, when I log in to the server via SSH, I can run commands like: cd /www/ ls -la #outputs contents of /www But when I do it via PHP with phpseclib, as below, any cd commands are totally ignored: <?php require_once __DIR__.'/vendor/autoload.php'; use phpseclib\Net\SSH2; $ssh = new SSH2('ssh.mydomain.com'); if (!$ssh->login('mydomain.com', 'mypassword')) { trigger_error(

JSch how to use with PuTTY private key

扶醉桌前 提交于 2019-12-01 01:04:38
I'm trying to use JSch with a private key configuration. I've generated a public and private key using PuTTYgen but am unsure what to do with both of the files. Which key (public/private) needs transferring to the server? First, you need to register your PuTTYgen-generated public key on the server. See Getting ready for public key authentication or (my) Set up SSH public key authentication . And finally see Can we use JSch for SSH key-based communication? for details on using the private key in JSch. Make sure you use the latest version of JSch, as older versions do not support the .ppk format

Java and putty - send commands [duplicate]

故事扮演 提交于 2019-11-30 23:44:59
Possible Duplicate: How to send commands to putty How can I send commands to the putty using java? I have to use Putty. I mean sending commands to the putty window, e.g. Java should sending "ls -l" to the putty window. To use Putty from Java™ you will need to use Putty's (Command Line) Link PLink. You can get this from Putty's Download page: Putty Download Page You will need to run putty.exe to configure a session (in the example I made a profile name “profile”). You can then load the session and send/receive information. Don't forget to make sure that you check both the standard and error

Automate MySQLdump to local computer (Windows)

杀马特。学长 韩版系。学妹 提交于 2019-11-30 22:47:32
I'd like to automate a mysqldump to my computer from a remote host, and I cannot figure out how to do it. I suppose that I should run a mysqldump through an SSH tunnel, but this becomes complicated by the fact that my local computer is a Windows XP machine. I'm using putty to open a tunnel like so: putty -load "[my saved session]" -L [localport]:localhost:3306 -N Note: I can't just connect to the mysql server remotely. Instead of PuTTY, download the command line version plink.exe . Then using the same connection parameters you can run the mysqldump via plink and save the output locally. PLink

Scripting over ssh through putty on windows

限于喜欢 提交于 2019-11-30 22:41:20
I need to script a mysql restore of a linux machine from a windows machine. I have putty and I know it has ssh capability. Here is what I have: C:\Progra~1\Putty\putty.exe -ssh root@10.1.2.3 && mysql -u USER -pPASS db < /tmp/dump.sql My problem in writing a script is that putty opens a new window and transfers control there, so anything coming after putty.exe -ssh doesn't do anything. You can use the -m option to specify a file which contains a command to run on the remote connection. Example: C:\Progra~1\Putty\putty.exe -ssh -m C:\cmd.txt root@10.1.2.3 Contents of C:\cmd.txt mysql -u USER

Windows与VMware Workstation相互拷贝文件

一曲冷凌霜 提交于 2019-11-30 21:48:02
条件: 1、一台笔记本电脑,运行Windows 10 2、Windows上安装了VMware Workstation 12 3、VMware Workstation中安装了Red Hat Linux 7.2 操作系统 4、笔记本电脑通局域网上网 5、Windows上安装了PuTYY 任务: 1、将电脑上的文件拷贝到VMware中的Red Hat中 2、将VMware中的Red Hat中的文件拷贝到Windows 10中 情景之一:虚拟机安装了图形界面 如果VMware中的Red Hat Linux安装了X Window图形界面,要完成任务,只需要将文件在两个窗口之间拖拽即可。Red Hat Linux虚拟机中的文件要是不在桌面上,就把它们拷贝到桌面上。 root用户的桌面:/root/Desktop 其他用户的桌面:/home/xxx/Desktop xxx就是该用户的登录名 情景之二:虚拟机没有安装图形界面 方法1:用U盘或移动硬盘在Windows“东家机”与Linux“宾客机”之间分别挂载 方法2:用PuTTY在“东家机”与“来宾机”之间拷贝,可以尽现高手极客之风范 步骤一:查看虚拟机的IP地址 有很多方法,最简单的就是 上图:点击右上角的小图标。要是出现一个小叉叉,说明作为“宾客机”的虚拟机不能上网,是不行的。 步骤二:打开Windows“东家机”上的Power Shell

Why would SSH commands through Putty work differently to those via PHP's phpseclib?

ぃ、小莉子 提交于 2019-11-30 21:16:00
问题 I'm writing a script to automate deployment from my windows development PC to a shared hosting server. I am getting different results depending on whether I execute the commands via Putty or PHP (both running on my PC) . In putty, when I log in to the server via SSH, I can run commands like: cd /www/ ls -la #outputs contents of /www But when I do it via PHP with phpseclib, as below, any cd commands are totally ignored: <?php require_once __DIR__.'/vendor/autoload.php'; use phpseclib\Net\SSH2;

BeagleBone Black教程之BeagleBone Black设备的连接

折月煮酒 提交于 2019-11-30 19:46:06
BeagleBone Black教程之BeagleBone Black设备的连接 BeagleBone Black开发前 需要准备的材料 经过上面的介绍,相信你已经对 BeagleBone 有了大致的了解,你需要注意到完成一件事情可能有多种不同的方式。所以,依赖于你要完成的项目,需要的材料也会不同,下面的材料可以助你完成本书的大部分项目,但不是必须的: q BeagleBone 或者 Beaglebone Black q 5V 直流适配器 q 网线 q USB A 到 mini B 线 q 面包板 q 跳线 q LED 若干 q 各规格电阻 q 按钮 q 开关 q 电位器 q 温度传感器 q MicroSD 卡 如果你用的是 BeagleBone Black ,你可能还需要准备下面的材料: q HDMI 监视器(或者 VGA 监视器) q Micro HDMI 线(或者 Micro HDMI 到 VGA 适配器) q 键盘 q 鼠标 q USB HUB q 3.3V FTDI 线或者兼容线 BeagleBone Black的 操作系统 和一个计算机一样, BeagleBone 也有一个操作系统,它默认使用的是开源、免费的 Linux 操作系统。当然, BeagleBone 官方提供了多种操作系统可供选择: q Debian q Ångström q Android q Ubuntu

Java and putty - send commands [duplicate]

a 夏天 提交于 2019-11-30 18:46:38
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to send commands to putty How can I send commands to the putty using java? I have to use Putty. I mean sending commands to the putty window, e.g. Java should sending "ls -l" to the putty window. 回答1: To use Putty from Java™ you will need to use Putty's (Command Line) Link PLink. You can get this from Putty's Download page: Putty Download Page You will need to run putty.exe to configure a session (in the

How to prevent PuTTY shell from auto-exit after executing command from batch file in Windows?

不问归期 提交于 2019-11-30 17:37:30
I have written a batch file like this: Start putty.exe -ssh 172.17.0.52 -l root -m dummy.txt Then in dummy.text I have written this command: avahi-daemon --no-drop-root -D export XVHMI_USERCONFIG_PATH=/home/UserProfileConfig export XDG_RUNTIME_DIR=/tmp cd /opt/bosch/airis/bin When I run the .bat file, PuTTY starts, commands execute (hopefully, not sure) and it exits. How to keep that window open? I have googled for the same, but no solid help. I read on stack overflow itself that we need to define something in txt file, but what and most importantly how? The SSH session closes (and PuTTY with