sFtp in Golang : How to get logs output?

agolangf · · 68 次点击    
<p>Hi there!</p> <p>I having issues with connect to a sftp via golang sFtp module.</p> <p>If I debug it directly from an openSSH client, I can see all kind of ouput with ssh -vvv <a href="mailto:user@host" rel="nofollow">user@host</a>. It really help to debug.</p> <p>Can we do the same in the sFtp module? Because I&#39;m getting an Auth fail without further explanation.</p> <p>Thank you!</p> <hr/>**评论:**<br/><br/>aboukirev: <pre><p>Are you capturing <code>err</code> from call to <code>ssh.Dial()</code>? It should tell you details if there were any problems during handshake and what authentication methods it tried if ti failed to authenticate. Also, I recommend not setting cipher in the client config - server should know the cipher from the public key of the pair. That eliminates one potential issue.</p></pre>Kardiamond: <pre><p>Yes I&#39;m capturing it, but it&#39;s only saying Auth failed.</p> <pre><code>Failed to dial: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain </code></pre> <p>I&#39;m forced to set my cipher as my host is still using cbc siphers, and they are disabled by default in sFtp.</p></pre>
68 次点击  
加入收藏 微博
0 回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传