将ConEmu cli连接到远程服务器时出错

时间:2018-02-06 06:15:44

标签: linux cmd putty

我一直在尝试使用以下命令从Windows终端应用程序 ConEmu 连接我的远程CentOS服务器:

"C:\Program Files\PuTTY\plink.exe" username@<ipaddress>

我一直收到错误:

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

2 个答案:

答案 0 :(得分:2)

有两种方法可以运行命令:

  1. 绝对路径配置。
  2. DECLARE @tblLabTests AS Table ( TestId INT, TestName VARCHAR(50) ) DECLARE @tblTestsRanges AS Table ( TestId INT, LowerLimit INT, UpperLimit INT ) INSERT INTO @tblLabTests VALUES(1,'White Blood Cell Count') INSERT INTO @tblLabTests VALUES(2,'Red Blood Cell Count') INSERT INTO @tblLabTests VALUES(3,'Hemoglobin Concentration') INSERT INTO @tblLabTests VALUES(5,'Mean Cell Volume') INSERT INTO @tblTestsRanges VALUES(1,1,10) INSERT INTO @tblTestsRanges VALUES(1,11,20) INSERT INTO @tblTestsRanges VALUES(2,15,20) INSERT INTO @tblTestsRanges VALUES(2,6,9) select CASE WHEN a.TestId = lag(a.TestId) OVER (ORDER BY a.TestId) THEN '' ELSE CAST(a.TestId AS VARCHAR(50)) END TestId , CASE WHEN a.TestName = lag(a.TestName) OVER (ORDER BY a.TestName) THEN '' ELSE CAST(a.TestName AS VARCHAR(50)) END TestName, b.LowerLimit , b.UpperLimit from @tblLabTests a, @tblTestsRanges b where a.TestId = b.TestId order by a.TestId

    1. 相对路径配置。
    2. 为此,您需要设置环境变量。存储命令的绝对路径值的位置。

      "C:\Program Files\PuTTY\plink.exe" username@<ipaddress> -ssh

答案 1 :(得分:0)

如果已经保存了PuTTY会话,那么不要像这样提供主机名:

"C:\Program Files\PuTTY\plink.exe" username@<ipaddress> -ssh

plink.exe -shh username@<ipaddress>

可以使用PuTTY上保存的会话的名称:

plink.exe -ssh username@<savedsessionname>