Ssh Issues
Authentication failure
You get the following exception when using the Ssh plugin for remote connectivity:
com.jcraft.jsch.JSchException: Auth fail
- If this is using a keyfile/passphrase connection, retry using a username/password instead.
- If username/password still fails, check that you can log on to the server via a command line from the framework server with the credentials you supplied. If you cannot log in, rectify the issue so that command line login works. The following tips may help.
- Does the target server allows SSH with or without a passphrase (as required).
- The user on the target server is correctly configured for SSH (has a .ssh or .ssh2 directory which contains the public key, and a correctly configured authorized keys file or directory).
- Check that the users home directory, ssh directory and ssh files all have the correct permissions (ssh is very dependent on directory/file permissions).
- Check that the user account is not locked.
- Check that the user account is allowed to remote login.
- Check that the user account has not reached its maximum failed login count.
- Make sure you have accepted the target servers host key by making an SSH connection on the command line (for the first connection).
Channel Request failure
You see the following error:
com.midvision.rapiddeploy.exceptions.CommandInvocationException: com.jcraft.jsch.JSchException: failed to send channel request
Check your sshd_config, specifically the following and set them
UsePAM yes PermitUserEnvironment yes Subsystem sftp /usr/libexec/openssh/sftp-server
Restart the Ssh daemon with:
stopsrc -s sshd startsrc -s sshd
Jsch: Exception: - 4
You get the following exception when performing a copy using the Ssh plugin:
SCP Copy returned an error: com.jcraft.jsch.JSchException: Could not get '<source directory>' to '<target directory>' - 4:
You can occasionally get this exception on Unix/Linux hosts when one of the following conditions is met:
- You have a space at the start of the filename e.g. " file1.txt"
- The target file system is full
- A file for download has a size of 0 bytes
- There is a network connection issue
Jsch: Permission denied
You get the following exception when performing a copy using the Ssh plugin:
2013-08-06 13:32:16,171 [main] DEBUG com.midvision.rapiddeploy.utilities.exec.SshExec - Starting File Upload for source: path/to/source/file, to target: /path/to/target/file ... Exception 3: Permission denied at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
Check that the path to the target directory and file /path/to/target/file above, is writeable by the user connecting via Ssh. If not, alter the permissions so that the target is writeable, for example by using the chmod command.
UnsupportedClassVersionError - Wrong version of Java
You see the following exception after the deployment has copied the necessary files to the target, as the orchestration command is invoked:
The java class could not be loaded. java.lang.UnsupportedClassVersionError: (Unsupported major.minor version 49.0) SSH Command Execution Error (details follow): CommandExecutionException [RapidDeployBusinessException [com.midvision.rapiddeploy.exceptions.CommandExecutionException: SSHEXEC Command execution returned a non-zero error code: 1]]
The problem is that the executable was compiled with a Java version later than the current runtime version. RapidDeploy requires the runtime version be at least 1.6 to run the orchestration. To determine if the runtime Java supports the level of Java with which the program was compiled, follow these steps:
Check the runtime version of Java.
java -version For example, the output might look like this: java version "1.4.2" Java 2 Runtime Environment, Standard Edition (build 1.4.2)
You can resolve this issue by doing one of the following things:
- Update the profile for the SSH user for RapidDeploy to select a later version of Java, by setting the JAVA_HOME and PATH variables accordingly.
export JAVA_HOME=/path/to/java export PATH=${JAVA_HOME}/bin:${PATH}
- Update the target server SSH plugin panel to set the remoteJavaPath to the path of an installed 1.6+ JRE on the target server.
相关推荐
JSch - Java实现的SFTP(文件上传详解篇)
jsch-0.1.53 不支持修改编码格式,sftp.setFilenameEncoding("GBK");这样修改是不起作用的,所以必须修改源码。此处是修改源码后重新导出的jar包。
sftp解决上传中文乱码,sftp.setFilenameEncoding("GBK");修改是不起作用的,修改源码后重新导出的jar包。
主要介绍了详解Java使用Jsch与sftp服务器实现ssh免密登录,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
SFTP下载(JSch可跨服务器) 原文下载无乱码情况很好的跨服务器下载方式
jsch-jar包文件
SFTP例子和jsch-0.1.44.jar
jsch实现sftp文件上传、下载文件,提供jsch jar
利用com.jcraft.jsch进行SFTP下载文件,方便简单快捷操作SFTP
java 实现 sftp 文件上传下载 等操作。
SFTP,上传,下载文件,jar
Jsch jar包 下载 SFTP 欢迎是大家下载 jsch-0.1.51.jar
在連接SFTP時,需要用到的包,可實現連接、上傳、下載等功能
jsch.jar java使用sftp实现上传下载文件 ,包含jar包 及 实现的工具类 ,供各位参考
JSch - Java实现的SFTP(文件上传/下载详解篇)
主要为大家详细介绍了java使用JSCH实现SFTP文件管理,实现上传、下载等功能,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
一个用于sftp的jar包,用于实现ssh的上传下载文件,给个评论就能得到了,我找的时候可费了些时间
jsch-0.1.42.jar和一个例子。用java实现SFTP的例子
sftp源码sftp源码sftp源码sftp源码sftp源码sftp源码