首页 \ 问答 \ Windows 2012上sshd连接意外关闭[关闭](sshd connections unexpectedly close on windows 2012 [closed])

Windows 2012上sshd连接意外关闭[关闭](sshd connections unexpectedly close on windows 2012 [closed])

我一直在使用FreeSSHD连接到我的Windows服务器[Windows 2K3 -R2企业服务器和Windows 2K8-R2企业服务器]。 成功的SSH连接(即Windows平台)后,Windows命令提示符出现。

[我的观察]:对于Windows Server 2012,FreeSSHD安装很顺利。 我能够从远程计算机建立到服务器的SSH连接。 但是,SSH连接意外关闭,putty终端立即关闭。 我启用了FreeSSHD日志记录并注意到连接已成功完成但立即终止。

putty日志显示以下错误消息:

tester @ server-w12-1的密码:无法创建子桌面:访问被拒绝。

我尝试安装CopSSH。 有了这个,我就能建立稳定的SSH连接。 但它使用cygwin平台。 我提到“ http://en.wikipedia.org/wiki/Comparison_of_SSH_servers ”来获取可用的SSH服务器列表。

[Rephrased Question]:在我的应用程序中,我使用SSH调用连接到服务器(Windows和Linux)来查询驱动器的具体细节。 有人可以建议在Windows 2012服务器上运行的免费SSH服务器或建议修复FreeSSHD会话断开问题吗?

编辑:我无法添加答案或添加长评论。 所以我发布了一个编辑。

[解]

感谢特拉维斯的指导。 问题得到解决。 我做了以下事情:

  1. 禁用本地安全策略下的“用户帐户控制:以管理员批准模式运行所有管理员”设置
  2. 右键单击FreeSSHd图标,然后单击“以管理员身份运行”
  3. 在FreeSSHd应用程序属性的“兼容性”选项卡下选择“以管理员身份运行”选项
  4. 正如Travis所提到的,确保SSH服务器正在运行。 如果没有在FreeSSHd的SSH选项卡下更改端口#来说222并让它运行。 重启服务
  5. 我的程序需要默认端口22.所以我将端口更改回22并且我能够运行该服务
  6. 即使多次重启,我也可以通过SSH连接到服务器

I have been using FreeSSHD to connect to my Windows servers[Windows 2K3 -R2 Enterprise servers and Windows 2K8-R2 Enterprise servers]. The Windows command prompt shows up after a successful SSH connection (i.e Windows platform).

[My Observations]: In case of Windows server 2012, the FreeSSHD installation goes through fine. I am able to make an SSH connection to the server from a remote machine. However, the SSH connection unexpectedly close and the putty terminal closes immediately. I enabled FreeSSHD logging and noticed that the connection is successfully made but terminated immediately.

The putty log shows the following error message:

tester@server-w12-1's password: Could not create child desktop: Access is denied.

I tried installing CopSSH. With this I am able to establish stable SSH connections. But it uses cygwin platform. I referred to "http://en.wikipedia.org/wiki/Comparison_of_SSH_servers" to get the list of available SSH servers.

[Rephrased Question]: In my application I am using SSH calls to connect to server (Windows & Linux) to query drive specific details. Can someone please suggest a free SSH server that runs on Windows 2012 server or suggest a fix for FreeSSHD session disconnect issue?

EDIT : I was unable to add an answer or add a long comment. So I am posting an edit.

[Solution]

Thanks Travis for your guidence. The issue is resolved. I did the following:

  1. Disable the setting "User Account Control: run all Administrators in admin approval mode" under local security policy
  2. Right Click FreeSSHd icon and click "Run as Administrator"
  3. Select the option "Run as Administrator" under "Compatibility" tab of FreeSSHd application properties
  4. As Travis had mentioned, ensure the SSH server is running. If not change the port# under FreeSSHd's SSH tab to say 222 and get it running. Restart the service
  5. My program needs the default port 22. So I changed the port back to 22 and I was able to have the service running
  6. I was able to SSH to the server even after multiple restarts

原文:
更新时间:2022-03-30 21:03

最满意答案

您可以尝试使用位置tzname初始化tzname (对于TimeZone 使用此方法 )而不是abbreviation

对于Saskatchewan来说,它将是"Canada/East-Saskatchewan""Canada/Saskatchewan""America/Regina"


You can try initialising your NSTimeZone with location tzname (for TimeZone use this) instead of abbreviation.

For Saskatchewan it would be "Canada/East-Saskatchewan", "Canada/Saskatchewan" or "America/Regina".

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)