{"action":"created","issue":{"url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/244","repository_url":"https://api.github.com/repos/darkoperator/Posh-SSH","labels_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/244/comments","events_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/244/events","html_url":"https://github.com/darkoperator/Posh-SSH/issues/244","id":393507740,"node_id":"MDU6SXNzdWUzOTM1MDc3NDA=","number":244,"title":"Multiple Commands with Invoke-SSHStreamExpectSecureAction","user":{"login":"StevenNoel","id":30878244,"node_id":"MDQ6VXNlcjMwODc4MjQ0","avatar_url":"https://avatars3.githubusercontent.com/u/30878244?v=4","gravatar_id":"","url":"https://api.github.com/users/StevenNoel","html_url":"https://github.com/StevenNoel","followers_url":"https://api.github.com/users/StevenNoel/followers","following_url":"https://api.github.com/users/StevenNoel/following{/other_user}","gists_url":"https://api.github.com/users/StevenNoel/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenNoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenNoel/subscriptions","organizations_url":"https://api.github.com/users/StevenNoel/orgs","repos_url":"https://api.github.com/users/StevenNoel/repos","events_url":"https://api.github.com/users/StevenNoel/events{/privacy}","received_events_url":"https://api.github.com/users/StevenNoel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T15:59:24Z","updated_at":"2018-12-21T20:59:27Z","closed_at":null,"author_association":"NONE","body":"Looking for a way to automate changing the root password across multiple hosts in our environment.\r\n\r\nIt works via the unsecure/plaintext method, but I'd like to use the Invoke-SSHStreamExpectSecureAction to secure the creds being passed.\r\n\r\nI'm currently trying this\r\n\r\n> Invoke-SSHStreamExpectSecureAction -ShellStream $sshshellstream -Command 'passwd' -ExpectString \"New password:\" -SecureAction ($securePass) -Verbose\r\n\r\nHowever, I need to re enter the password on the 2nd confirmation prompt.\r\n\r\nIs there any way to send multiple SecureActions using this command?"},"comment":{"url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/comments/449496914","html_url":"https://github.com/darkoperator/Posh-SSH/issues/244#issuecomment-449496914","issue_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/244","id":449496914,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTQ5NjkxNA==","user":{"login":"darkoperator","id":521246,"node_id":"MDQ6VXNlcjUyMTI0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/521246?v=4","gravatar_id":"","url":"https://api.github.com/users/darkoperator","html_url":"https://github.com/darkoperator","followers_url":"https://api.github.com/users/darkoperator/followers","following_url":"https://api.github.com/users/darkoperator/following{/other_user}","gists_url":"https://api.github.com/users/darkoperator/gists{/gist_id}","starred_url":"https://api.github.com/users/darkoperator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkoperator/subscriptions","organizations_url":"https://api.github.com/users/darkoperator/orgs","repos_url":"https://api.github.com/users/darkoperator/repos","events_url":"https://api.github.com/users/darkoperator/events{/privacy}","received_events_url":"https://api.github.com/users/darkoperator/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T20:59:27Z","updated_at":"2018-12-21T20:59:27Z","author_association":"OWNER","body":"At the moment no, the function is in PowerShell and not C# so you should be able to grab the code from it and build a custom one based on it. \n\n> On Dec 21, 2018, at 11:59 AM, Steve Noel <notifications@github.com> wrote:\n> \n> Looking for a way to automate changing the root password across multiple hosts in our environment.\n> \n> It works via the unsecure/plaintext method, but I'd like to use the Invoke-SSHStreamExpectSecureAction to secure the creds being passed.\n> \n> I'm currently trying this\n> \n> Invoke-SSHStreamExpectSecureAction -ShellStream $sshshellstream -Command 'passwd' -ExpectString \"New password:\" -SecureAction ($securePass) -Verbose\n> \n> However, I need to re enter the password on the 2nd confirmation prompt.\n> \n> Is there any way to send multiple SecureActions using this command?\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub <https://github.com/darkoperator/Posh-SSH/issues/244>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAf0Hg_avjMLXblLWNE1da8Ti8C5uritks5u7QVdgaJpZM4ZeMsk>.\n> \n\n"}}
{"actor":{"display_login":"darkoperator"}}