Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Sun Solaris 5.10 - SSH 1.1.3-Not able to connect to server with ssh -Urgent

Umamaheswararaom-OracleNov 30 2010 — edited Dec 1 2010
Hi,
I am not able to coonect to a server using the using the below code.

If i try the same code on the server to connect it self, it is working fine. But when i try to connect from other server it give the below error. And i am using the IBM Jdk while getting this error. Is there some setting to avoid this error.

Error:
INFO: Adding /usr/jdk/instances/jdk1.6.0/jre/lib/ext/sunpkcs11.jar to the extension classpath
ConfigurationLoader
Nov 30, 2010 4:33:12 PM com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory <clinit>
INFO: Loading public key algorithms
Error While SFTP
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
at java.util.StringTokenizer.nextElement(StringTokenizer.java:390)
at com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification.<init>(Unknown Source)
at com.sshtools.j2ssh.transport.ConsoleKnownHostsKeyVerification.<init>(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at fileTransfer.connectToServer(fileTransfer.java:18)
at fileTransfer.main(fileTransfer.java:56)



Code:
public static boolean connectToServer(String serverIp, int serverPort, String userId, String password)
{
SshClient sfc = null;
try {
System.out.println("inside Try of as its SFTP");
ConfigurationLoader.initialize(false);
System.out.println("ConfigurationLoader");

sfc = new SshClient();
sfc.connect(serverIp, serverPort);
System.out.println("sfc.connect");

PasswordAuthenticationClient pwd = new PasswordAuthenticationClient();

pwd.setUsername(userId);

pwd.setPassword(password);

int checkAuth = sfc.authenticate(pwd);
System.out.println("checkAuth " + checkAuth);

if (checkAuth == 4) {
System.out.println("AuthenticationProtocolState.COMPLETE");

SftpClient sftp = sfc.openSftpClient();
sftp.quit();
sfc.disconnect();
}
else
{
throw new Exception("Invalid User Name or Password for user");
}
}
catch (Exception e)
{
System.out.println("Error While SFTP ");
sfc.disconnect();
e.getStackTrace();
return false;
}
return true;
}

Comments

LiuMaclean(刘相兵)
尝试使用rlogin 或 rsh等其他等价手段,或者先将SSH改回默认的 22 port,安装完成RAC后再修改回去
wonder_
非常感谢maclean的回答

1:先将SSH改回默认的 22 port,安装完成RAC后再修改回去

请问安装完RAC后是直接更改SSH端口为其他端口就可以了吗?还是说更改后,要修改哪些RAC选项,才可以让集群间正常同步?非常希望有详细的步骤,谢谢!
LiuMaclean(刘相兵)
Answer
RAC 安装完成后 节点间通信不依赖于SSH
Marked as Answer by wonder_ · Sep 27 2020
有教无类
学习,感谢
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 29 2010
Added on Nov 30 2010
3 comments
2,219 views