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会话断开问题吗?
编辑:我无法添加答案或添加长评论。 所以我发布了一个编辑。
[解]
感谢特拉维斯的指导。 问题得到解决。 我做了以下事情:
- 禁用本地安全策略下的“用户帐户控制:以管理员批准模式运行所有管理员”设置
- 右键单击FreeSSHd图标,然后单击“以管理员身份运行”
- 在FreeSSHd应用程序属性的“兼容性”选项卡下选择“以管理员身份运行”选项
- 正如Travis所提到的,确保SSH服务器正在运行。 如果没有在FreeSSHd的SSH选项卡下更改端口#来说222并让它运行。 重启服务
- 我的程序需要默认端口22.所以我将端口更改回22并且我能够运行该服务
- 即使多次重启,我也可以通过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:
- Disable the setting "User Account Control: run all Administrators in admin approval mode" under local security policy
- Right Click FreeSSHd icon and click "Run as Administrator"
- Select the option "Run as Administrator" under "Compatibility" tab of FreeSSHd application properties
- 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
- My program needs the default port 22. So I changed the port back to 22 and I was able to have the service running
- I was able to SSH to the server even after multiple restarts
原文:
最满意答案
您可以尝试使用位置
tzname
初始化tzname
(对于TimeZone
使用此方法 )而不是abbreviation
。对于
Saskatchewan
来说,它将是"Canada/East-Saskatchewan"
,"Canada/Saskatchewan"
或"America/Regina"
。You can try initialising your
NSTimeZone
with locationtzname
(forTimeZone
use this) instead ofabbreviation
.For
Saskatchewan
it would be"Canada/East-Saskatchewan"
,"Canada/Saskatchewan"
or"America/Regina"
.
相关问答
更多-
如何改变(美国/芝加哥)时间进入印度(亚洲/加尔各答)的时间(how can change (America/Chicago) time into indian(Asia/Kolkata) time)[2021-10-12]
尝试此代码以保存为印度时间。 "; date_timezone_set($date,timezone_open("Asia/Kolkata")); $indiatime = date_format($date,"Y-m-d H: ... -
你的代码是正确的,正如VincenzoC在评论中指出的那样,DST当时生效,这就是你得到结果的原因。 你正在使用America/Chicago ,这意味着字面意思 - 芝加哥的时间。 它代表了整个美国中部时区。 在没有夏令时的情况下,美国没有使用中央时间的地方,所以要求这样做是荒谬/无效的。 如果你真的不是指美国中部时间,你的其他选择将是: 选择正确的时区。 .tz('America/Regina') // Saskatchewan, Canada (UTC-6 all year) . ...
-
总之,如果您在Mac上使用C,C ++或Objective C进行开发,您可能只想使用XCode。 不确定Eclipse在做什么,但是(请参阅注释中的链接)早期版本的Eclipse可能会在以后的版本中不起作用。 In summary, if whether you're developing in C, C++ or Objective C on the Mac, you probably just want to use XCode. Not sure what Eclipse was doing, bu ...
-
感谢我的评论,我设法解决了这个问题:当元素的类对象被另一个类加载器加载为加载尝试执行强制转换的类的类加载器时,就会发生这种情况。 为了解决这个问题,我在Dependencies-> Imported Packages部分中添加了lib,而不是在Runtime-> ClassPath中添加了lib Thanks to comments I got, I managed to solve the issue: It happens when the class object of the element was ...
-
日食中的CDT问题(Issue with CDT in eclipse)[2022-05-02]
由于您使用的是C ++,因此使用new运算符而不是malloc ,崩溃发生在您调用malloc或第4个节点创建的第14次迭代时,由于带有调试的额外填充,它允许它处于调试模式(尽管技术上UB否则)并且可能通过保护字节写入。 同样,它在malloc代码上崩溃了,因为你使用的是sizeof(node) vs sizeof(Node) 。 Since you're using C++, use the new operator instead of malloc, the crash happened upon t ... -
您的Eclipse项目必须反映与makefile相同的行为。 将make的输出(即对gcc的调用或您正在使用的任何编译器和链接器)与属性> C / C ++ Build> Settings中的Eclipse项目设置相匹配。 我将开始查看包含路径( -I )和定义的符号( -D ),然后在其他标志处查看。 遗憾的是,Eclipse在从makefile导入项目时并不聪明,也不能从外部构建工具中解析编译器和链接器设置。 Self-answering. Running around without a proper ...
-
我无法在mac上使用eclipse和CDT编译helloworld.cpp(I cannot compile helloworld.cpp with eclipse & CDT on mac)[2024-03-01]
Eclipse可能很难导航。 你可以剪切'n'粘贴你的helloworld.cpp以及你所遵循的Eclipse指令的链接吗? 编辑:K,它似乎没有将文件识别为c ++。 您可能希望确保从一个c ++项目开始。 此外,许多windows eclipse问题也应该对你有所帮助。 I fixed this by replace Indigo with an older version Helios, and it's working fine. Hope someone can come up with othe ... -
在Eclipse Editors中查找Segmented和Projected模式。 例如, ProjectionViewer由CDT的CSourceViewer扩展。 Look up Segmented and Projected modes in Eclipse Editors. For example, the ProjectionViewer which is extended by CDT's CSourceViewer.
-
我将我有文件的文件夹添加到Eclipse项目的源文件夹列表中,它现在正在运行! I added the folder where I have the files to the list of source folders of the Eclipse project and it is working now!
-
timezoneWith缩写:@“CST”返回美国/芝加哥(CDT)值(timezoneWithAbbreviation:@“CST” return America/Chicago (CDT) value)[2023-07-20]
您可以尝试使用位置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 abbrevi ...