New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid packet exception ssh'ing as root when "Please login as the ubuntu user rather than root user" #75
Comments
To get a suitable VM to reproduce, the jclouds code in [1] gives the error, as discussed in [2] and [3]. [1] https://gist.github.com/2489273 |
Thanks for the report @aledsage , it's odd that there is different behaviour with the openssh client & with sshj. I will try to reproduce what's going on. |
Could you post what you get with
(sftp command instead of ssh) |
So I tried this out, even openssh sftp client bails out...
So it's not an sshj issue |
Confirmed I get the same with
|
For the benefit of anyone searching for more information on this.... This link explains what's going on in openssh sftp: http://www.snailbook.com/faq/sftp-corruption.auto.html The problem here is similar to if the underlying ssh command causes stdout (e.g. due to system or per-user shell startup files on the server). The text pollutes the protocol stream between scp2/sftp and sftp-server. The first four bytes of the text gets interpreted as a 32-bit packet length. |
That's a good explanation, thanks @aledsage |
@aledsage '...(like fortune, echo "Hi there!", etc.)....' you saved me, thx |
I have an ubuntu VM that I'm trying to use with the following code:
It gives me the error:
Trying to ssh or scp to the machine at the command line with:
gives:
It works when I ssh in as:
Is there some different behaviour of the ssh protocol in this situation?
The text was updated successfully, but these errors were encountered: