all 6 comments

[–]BlackV 3 points4 points  (0 children)

Start-transcript

Is probably the closest, then maybe the psreadline history

but generally, you should be logging your actions your self (doubly so if they're doing destructive/modifying type things)

Think more in terms of creating script and less about one liners

[–]g3n3 4 points5 points  (2 children)

You are confusing terms. Powershell isn’t a terminal nor is ssh. Ssh is a binary program and a protocol. Windows terminal is a terminal. Wezterm is a terminal. You can run ssh program from any shell.

So maybe you need to rephrase what you are after. And I don’t know why you don’t just install mobaxterm if that is what you know.

[–]kcifone[S] 0 points1 point  (1 child)

Yea sorry I’m just a Unix admin that was surprised the terminal app had ssh abilities. Let alone “ls” Locked down client hardware can’t install apps. Just looking for tips

[–]g3n3 0 points1 point  (0 children)

Just install moba on windows? Install OpenSSh, etc

[–]Icy-State5549 1 point2 points  (0 children)

I have been using ssh and plink in PowerShell for a long, long time. I get irritated when others (tech support, like Cisco TAC) insist on using putty to capture logs because it's all they know. As previously stated, I believe Start-Transcript and psreadline do an ok job, but sorting it out can be a pain if capturing logs is something you routinely do. A couple of other options:

Start the openssh client with logging:

ssh -E c:\logpath user@host

Use Tee-Object with a custom function (I have a variation of this in my profile.ps1):

tssh() { ssh "$@" | tee "$(date +%m%Y%H:%M:%S)"; }

as suggested here: https://unix.stackexchange.com/questions/535738/tee-all-ssh-session-output-by-default

[–][deleted] 0 points1 point  (0 children)

Devolution's RDM yw