使用libssh连接到SUSE
Connect to SUSE using libssh
我正在尝试使用libssh(https://www.libssh.org/)建立一个连接,以安装Suse Enterprise操作系统。
ssh_options_set(tempSshSession, SSH_OPTIONS_HOST, host2Connect);
ssh_options_set(tempSshSession, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
ssh_options_set(tempSshSession, SSH_OPTIONS_PORT, &port);
int rc = ssh_connect(tempSshSession);
if(rc != SSH_OK) {
printf("Error connecting to the localhostn");
exit(-1);
}
// Authorized by the password.
rc = ssh_userauth_password(tempSshSession, username, password);
ssh_userauth_password()调用后将其返回响应:" ssh_auth_denied:身份验证失败:使用另一种方法"
它适用于以下操作系统,例如:Ubuntu,Linux Generic和Centos。
谢谢
检查/etc/ssh/sshd_config
。您应该在那里的某个地方找到PermitRootLogin forced-command-only
。将其设置为yes
,您的问题应该消失。请记住,有一个原因,为什么人们决定不允许每个默认的root用户/通过登录。
相关文章:
- 当套接字连接断开时检测C/C++Unix
- 无法在windows上使用mingw将sqlite3与c连接
- 到连接组件算法的问题(递归)
- QTcpSocket在不阻塞GUI的情况下重新连接到服务器
- 无法在C++中建立与MySQL数据库的连接
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 在Qt Creator中,如何在连接到正在运行的进程后查看控制台输出
- 连接 dockerized 模型和 dockerized 数据库时出现"无法 SQLConnect"错误
- 使用 bfs 解决连接组件问题时得到错误的答案
- 在C++的两个字符串中连接以逗号分隔的唯一值
- 如何修复valgrind启动时的致命错误(与libc6-dbg和libc6-dbg:i386连接)
- C++应用程序 MySQL odbc 数据库连接错误:在引发"otl_tmpl_exception<>"实例后终止调用
- OSX蓝牙打开RFCOMMChannelAsync声称已连接,但未建立连接,并且从未调用过委托
- 在 libcurl 连接池中预创建连接
- 套接字连接"Operation not permitted"错误,甚至使用升压/平发器根.cpp
- libcurl 和 DNS ttl 中的内部连接管理
- 如何应用 libcurl 的持久连接选项
- 提升 ASIO - io_service 不要等待连接到线程
- WinSock2:connect() 提供"连接被拒绝"
- 升压信号2将插槽传递到成员功能以断开连接