标签: putty

如何让putty相应地改变它的光标形状?

当我使用putty登录bash shell时,我希望它像Linux中的真正的术语模拟器.这意味着:如果我将shell设置为vi编辑模式,则光标将在插入模式下为垂直线,在命令模式下为块.我怎样才能做到这一点?

谢谢大家!

ssh bash putty zsh readline

8
推荐指数
1
解决办法
2828
查看次数

使用原始HTTP(Putty)通过POST发送文件

如果我使用以下格式设置html页面:

<html>

    <body>
        <form action="upload_file.php"
              method="post"
              enctype="multipart/form-data">

            <label for="file">Filename:</label>
            <input type="file" name="file" id="file" />
            <br />
            <input type="submit" name="submit" value="Submit" />
        </form>
    </body>

</html>
Run Code Online (Sandbox Code Playgroud)

我可以将文件上传到upload_file.php,我可以使用php脚本处理它.

出于测试目的,我需要通过Putty会话使用原始HTTP来做同样的事情.

我可以这样做一个正常的POST(只发送文本数据):

POST /test_post.php HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 11

name=myname
Run Code Online (Sandbox Code Playgroud)

如何以这种方式发送文件?

post putty http

8
推荐指数
2
解决办法
3万
查看次数

使用Plink(PuTTy)通过Python SSH

我正在尝试编写一个将SSH连接到服务器并执行命令的python脚本.我在Windows上使用Python 2.6,并安装了plink和paegent(用于ssh密钥)并将它们全部添加到我的路径中.

如果我转到命令提示符并键入:

plink username@host -i key.ppk
open vnc://www.example.com/
Run Code Online (Sandbox Code Playgroud)

我看到了所需的行为 - 我的Mac(服务器)上打开了VNC查看器.

但是,如果我尝试过两种方法通过Python以编程方式执行此操作,但两种方法都不起作用:

方法1(os):

import os
ff=os.popen("plink user@host -i key.ppk",'w')
print >>ff, r"open vnc://www.example.com"
ff.flush() 
Run Code Online (Sandbox Code Playgroud)

方法2(子流程):

import subprocess
ff=subprocess.Popen("plink user@host -i key.ppk",shell=False,stdin=subprocess.PIPE)
ff.stdin.write(r"open vnc://www.example.com")
ff.stdin.flush()
Run Code Online (Sandbox Code Playgroud)

这两种方法都不会产生错误,但都不会打开VNC窗口.但是,我相信他们都成功连接到远程主机.

我究竟做错了什么?

python ssh putty plink subprocess

8
推荐指数
1
解决办法
2万
查看次数

htop中缺少界面元素

重新安装系统(在客户端上)后,界面htop出现问题.没有显示一些元素:用户名,平均负载

客户:win7pro,putty 9708

服务器:ubuntu服务器12.04

user-interface putty interface htop

8
推荐指数
2
解决办法
4072
查看次数

在Visual Studio Code终端中使用远程服务器?

我最近切换到使用Sublime Text的Visual Studio Code,并对终端功能有疑问.它看起来像底部出现的"集成终端"安装在开箱即用的本地文件系统中.

我想知道的是,如果我可以用远程服务器替换这个本地终端?我有主机名,端口和登录凭据,并希望能够在我们的远程服务器上导航文件系统(如使用MobaXterm,PuTTy等),然后在Visual Studio Code中打开代码文件而不是vim或emacs.这可能吗?

谢谢!!

putty visual-studio visual-studio-code

8
推荐指数
1
解决办法
8490
查看次数

在PuTTY中,Emacs组合键没有任何效果

请尝试原谅这个稍微偏离编程主题的问题.至少我在将我的C++代码移植到Linux时遇到了这个问题.我遇到的问题非常基本:emacs无法识别某些组合键.其中一个结果就是我无法在Emacs中"撤消"编辑.

我正在从Windows运行Putty.exe到我的Ubuntu机器.Putty字符集(Window - > Translation - > received data char set)是UTF-8,我的所有瑞典字符都在控制台上整齐地显示出来.但是在Emacs中,我无法让C-_工作.什么都没发生.我的瑞典键盘上的键组合是

Ctrl Shift -

任何指针都有帮助!

ide emacs putty text-editor

7
推荐指数
1
解决办法
1907
查看次数

戒烟腻子是否会关闭跑步命令

我使用rsync在服务器之间使用putty复制15GB文件.我想知道,如果我关闭putty终端,那么也会终止rync,因为文件没有正确复制.

我已经尝试过,当我做备份时,即使我关闭putty然后脚本继续在后台运行

session rsync putty

7
推荐指数
1
解决办法
2万
查看次数

断开连接:没有可用的受支持的身份验证方法(服务器发送:publickey、gssapi-with-mic)

我不知道发生了什么。

我已经能够毫无问题地连接到服务器几天了,突然间我使用腻子冻结了一个窗口。之后,每次尝试连接时,都会收到以下消息:

disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic)
Run Code Online (Sandbox Code Playgroud)

我使用 putty 和 puttyagent 作为私钥。我已经将公钥上传到服务器,半小时前我能够连接。

我怎样才能检查它为什么失败?我没有更改用户或密码或任何内容。

ssh putty

7
推荐指数
5
解决办法
6万
查看次数

在 Plink 中启用 keepalive

我们正在使用 Plink 作为连接 MySQL 的隧道。我们以这种格式使用它:

plink.exe -L [Port of our client]:[my-sql server host name]:3306 [bridge server ssh username]@[bridge server IP] -i [private key]
Run Code Online (Sandbox Code Playgroud)

我们找不到阻止连接被关闭的选项,一种保活。

我们怎样才能做到这一点?

ssh putty plink portforwarding

7
推荐指数
2
解决办法
3559
查看次数

使用 PuTTY 进行身份验证时“无法使用密钥文件“...\id_rsa”(OpenSSH SSH-2 私钥)”

我在目标 Linux 上设置了自定义 SSH 密钥 host2

我能够从Linux的密码sshhost1host2使用下面的命令。

ssh -i /app/misc/myssh_keys/my_id_rsa myuser@host2
Run Code Online (Sandbox Code Playgroud)

然后我将其复制/app/misc/myssh_keys/my_id_rsa到我的 Windows 位置C:\putty\my_id_rsa

然后我尝试从 Windows 连接到 Linux host2,但它提示我输入密码而不是无密码登录。

下面是我的命令:

C:\putty\putty.exe -ssh -i C:\putty\my_id_rsa myuser@host2
Run Code Online (Sandbox Code Playgroud)

我得到以下带有密码提示的输出:

Unable to use key file "C:\putty\my_id_rsa" (OpenSSH SSH-2 private key)
Using username "myuser".
myhost@host2's password:
Run Code Online (Sandbox Code Playgroud)

以下是 Linux 的系统详细信息 host2

uname -a
Linux host2 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 16 14:19:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

以下是 Windows 主机的系统详细信息

C:\Users>systeminfo

Host Name:                 mywinhost
OS Name: …
Run Code Online (Sandbox Code Playgroud)

windows ssh putty ssh-keys password-less

7
推荐指数
1
解决办法
8139
查看次数