阅读内容

Linux中ssh与telnet服务启动方法

[日期:2007-12-29] 来源:Linux公社  作者:谷一招


最近测试公司的项目接触到sco/SuSE/linux等操作系统,总是在telnet和ssh远程连接的时候出一些问题。总结如下;
 
配置SSH服务:
1.修改配置文件
    vi /etc/ssh/sshd_config
2.找到#PermitRootLogin no将其修改为PermitRootLogin yes(X删除,I插入)


3.SHIFT+:输入WQ退出
 
配置TELNET服务:
vi /etc/inetd.conf
将telnet stream tcp nowait NOLUID /etc/telnetd   telnetd行的#注释删除
 
以下是连接SuSE时遇到的一个异常以及解决方法:
 
Password authentication fails, I get "Authentication method password not supported by the server at this stage".
Many default SSH server installations are configured to refuse the authentication type "password". Often, they only accept "publickey" and "keyboard-interactive". You have different options:

Enable password authentication. E.g., in case of OpenSSH on Fedora, edit /etc/sshd/sshd_config and change the value of "PasswordAuthentication" to "yes", then send a HUP signal to the daemon so that it re-reads its configuration.
Switch to public-key authentication. Probably the best choice.
Try to use keyboard-interactive authentication. If you have a GUI that interacts with a user, then this is doable (check out the SwingShell.java example).
In general it is a good idea to call either Connection.getRemainingAuthMethods() or Connection.isAuthMethodAvailable() before using a certain authentication method.

Please note that most servers let you in after one successful authentication step. However, in rare cases you may encounter servers that need several steps. I.e., if one of the Connection.authenticateWithXXX() methods returns false and Connection.isAuthenticationPartialSuccess() returns true, then further authentication is needed. For each step, to find out which authentication methods may proceed, you can use either the Connection.getRemainingAuthMethods() or the Connection.isAuthMethodAvailable() method. Again, please have a look into the SwingShell.java example.




相关资讯       SSH  telnet服务 
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google