Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Invoke-SsshCommand password problem

$
0
0
Hi,
I trying to execute a command using Invoke-SshCommand. While executing a command with sudo, its giving error bcz password not passed for sudo. So please anyone help me on how to deal with.

ex:
New-SshSession -ComputerName "XYZ" -UserName "xyz" -PassWord "*******"
Invoke-SsCommand -CompterName "XYZ" -Command "Sudo mkdir test"
Remove-SshSession
error is: had an error: sudo: no tty present and no askpass program specified

So the directory was not created. I manually checked the same command, asking for sudo password.

Thanks,
Bhaskar.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>