Skip to content
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

Credential Issue with Invoke-JunosCommand #9

Open
aniljham opened this issue Dec 7, 2016 · 7 comments
Open

Credential Issue with Invoke-JunosCommand #9

aniljham opened this issue Dec 7, 2016 · 7 comments

Comments

@aniljham
Copy link

aniljham commented Dec 7, 2016

Having Credential Issue with Invoke-JunosCommand.
Same credential work with Get-Junos

WARNING: There was a problem connecting to ..
WARNING: Please make sure your credentials are correct, and that the device is reachable.

@goozior
Copy link

goozior commented Jan 18, 2017

Got same problem. Any solution or some debug commands ?

@scottdware
Copy link
Owner

So, I've been testing it out on various devices: SRX, QFX, MX and I don't run into any issues. The only thing I've found to be an issue, is that if you are trying to connect to a device with a username that has SSH key authentication, then I see this error. If you just use a username/password combo, I haven't run into it.

Can you let me know if that's the case in your environment?

@jstore
Copy link

jstore commented Oct 18, 2017

I have the same issue and am using a username and password. I've confirmed that I can SSH into the srx using the same credentials. This was working for quite a while and I haven't modified my script at all. I did try to update Posh-SSH so maybe it has something to do with that.

It would be nice to have more debugging information when using the -Verbose and -Debug flags.

I checked the logs on my srx and it says "Accepted password for user" from sshd.

@jstore
Copy link

jstore commented Oct 18, 2017

It appears this has something to do with either the amount of commands issued or the size of the file the commands are stored in. Once I got above about 128 KB or ~750 commands in my case, I see this error. It works fine if I have less commands.

@jstore
Copy link

jstore commented Oct 20, 2017

I think the issue is that the SRX may have a 128kB buffer for a single command.

@Simmoni
Copy link

Simmoni commented Sep 24, 2019

I realize this issue is very old and probably not relevant anymore, but if you can run it as a different user you will probably see that it works.
Connecting as root requires you to first enter cli mode, and then you can run any commands as needed, the script does not seem to cater for that.

This line in the scripts assumes you are already in cli mode $results = Invoke-SSHCommand -Command "show version | display xml" -SSHSession $conn

@lostdignity
Copy link

I don't know if it is exactly the same problem but I am getting it everytime I use "-AsSecureString" for my password. Sending it plain works and sending the command without a password beforehand. You have to type it in in the connecting process securely. It's just not the best solution if you have lots of devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants