News for hackers. Stuff that matters.
Re:Session recording for Tailscale SSH in beta by matthewaveryusa on Thursday May 11, 2023 @04:49PM (#35908170)
A very valid use-case not mentioned in the article is to save all your personal terminal interactions to a database so you can search it in the future. Your terminal's input (and output) value per byte is enormous so really everyone should be saving it all.

I'll be horsing around with this tonight -- I hope ts sshing to my local computer will just work so I can get local recording as well without a separate mechanism.

Re:Session recording for Tailscale SSH in beta by chrisshroba on Thursday May 11, 2023 @05:53PM (#35908892)
I've thought about this too - if you use tmux, you can use `tmux capture-pane` to grab all the output and scrollback in the current window.
Re:Session recording for Tailscale SSH in beta by wkat4242 on Thursday May 11, 2023 @08:26PM (#35910284)
The value is enormous but the security sensitivity is too, so it's important to only store it in secure places.
Re:Session recording for Tailscale SSH in beta by wahern on Thursday May 11, 2023 @08:34PM (#35910336)
And on a company laptop with automagic backups to the cloud of your home directory, what's secure? At a previous company I disabled persistent shell history, and lost count of the number of times this prevented a sensitive password or key from being added to the treasure trove of secrets that are backup archives. (The backup app nominally supported exclusions, but 1) I don't trust the correctness of corporate bloatware, and more importantly 2) I don't trust that IT or an update wouldn't reset those exclusions.)

Now, shell sessions from a bastion host scream (hopefully!) security sensitive to IT. But dumps from company laptop home directories where 99% is crap from sales and management... no way that is going to be treated with proper care, no matter how much customer PII it might contain.

Re:Session recording for Tailscale SSH in beta by hamandcheese on Thursday May 11, 2023 @11:50PM (#35911671)
In this day an age, are workstation backups really necessary? I can't think of anything important I do on my work machine that would need it. Maybe a days worth of code edits that haven't been pushed to GitHub.
Re:Session recording for Tailscale SSH in beta by snapplebobapple on Friday May 12, 2023 @01:35AM (#35912303)
If its windows and you use weird certs for external interaction like most power pools do, its pretty important, especially thw solutions that spin up a vm in the cloud foe you quickly.
Re:Session recording for Tailscale SSH in beta by wkat4242 on Friday May 12, 2023 @02:00PM (#35919707)
For me personally yes absolutely.

But I'm not much into the whole cloud movement for privacy reasons.

Re:Session recording for Tailscale SSH in beta by XorNot on Friday May 12, 2023 @05:51AM (#35914031)
On a company laptop this all sounds like the company's problem, not mine.
Re:Session recording for Tailscale SSH in beta by catkitcourt on Sunday May 14, 2023 @02:31PM (#35940160)
The real problem here is you are typing those "sensitive password or key" into termianl. Instead of type it directly, Use `read password` and `mysql -p$password` is the right way. Additionally, most programs can use environment variables directly, so you can even avoid showing them in the command line arguments.

If you entered something in terminal directly, I won't call it sensitive.

Re:Session recording for Tailscale SSH in beta by yellow_lead on Friday May 12, 2023 @02:06AM (#35912541)
This project was mentioned recently here - it does this locally, saving to sqlite.

https://news.ycombinator.com/item?id=35839470

https://github.com/ellie/atuin

Re:Session recording for Tailscale SSH in beta by pcthrowaway on Friday May 12, 2023 @02:43AM (#35912799)
And it looked amazing, until another user pointed out that if you install it, whitespace-prefixed commands will start being saved in your bash history, and they refuse to document this behaviour
Re:Session recording for Tailscale SSH in beta by yellow_lead on Friday May 12, 2023 @09:52AM (#35916309)
Ooh, didn't see that.
Re:Session recording for Tailscale SSH in beta by jpeeler on Friday May 12, 2023 @10:19AM (#35916739)
Does mcfly also have this behavior? https://github.com/cantino/mcfly
Re:Session recording for Tailscale SSH in beta by jpeeler on Tuesday May 16, 2023 @09:21PM (#35970157)
Answering my own question, McFly does not have record whitespace prefixed commands.
Re:Session recording for Tailscale SSH in beta by tptacek on Thursday May 11, 2023 @04:55PM (#35908264)
This is a deceptively valuable feature for regulated/compliance-trained companies, because a lot of things you want a detailed audit trail for are accessed via shells (most notably: the consoles for app frameworks).
Re:Session recording for Tailscale SSH in beta by liotier on Thursday May 11, 2023 @05:22PM (#35908545)
Here at LargeTelco with a legally privileged and regulated safety-critical utility status, absolutely every administrative interaction with a production host goes through a bastion that, on top of enforcing access privileges, also records _everything_. Also, LargeTelco is complex hell of subnetting. I can very well see the enterprisey attraction of having not just Tailscale's low cost and extraordinary ease, but also session records like it is just a cherry on top !
Re:Session recording for Tailscale SSH in beta by nightfly on Friday May 12, 2023 @12:28AM (#35911906)
What do you use to log sessions?
Re:Session recording for Tailscale SSH in beta by cordigliere on Thursday May 11, 2023 @05:35PM (#35908683)
Seems like a self-hosted asciinema https://asciinema.org/
Re:Session recording for Tailscale SSH in beta by blueflow on Thursday May 11, 2023 @06:18PM (#35909116)
I use script(1) daily for creating papertrails:

  script -ec "command args" ~/$(date +%Y-%m-%d-%H%M%S_$$_script.txt)
Works out of the box on almost every *nix system.

The recordings end up as textfiles with the control sequences in, you can use commands like cat -v, grep or less -R on them. If you also record a timing file, you can replay it 1:1 on you terminal.

Re:Session recording for Tailscale SSH in beta by pelagicAustral on Thursday May 11, 2023 @07:03PM (#35909498)
Maybe slightly off-topic, but does anybody here know how to record an(or any) SSH session(s)? On a debian server, for example?

I remember seeing someone do a demo on this but the result, after only 2 minutes where insane. There was so much data to go through that you might aswell just give up on trying to get anything useful.

Re:Session recording for Tailscale SSH in beta by anonacct37 on Thursday May 11, 2023 @07:36PM (#35909839)
In the old days I played with something like this: https://github.com/desaster/kippo

But a more modern alternative seems to be the container based approach outlined here. https://lwn.net/Articles/848291/

Re:Session recording for Tailscale SSH in beta by wkat4242 on Thursday May 11, 2023 @08:28PM (#35910298)
PuTTY has very expensive logging options ranging from visible output only to full control codes and even packets.

I always assumed OpenSSH offers this too but I've never had a need to actually check. I guess you can just 'tee' it anyway.

Re:Session recording for Tailscale SSH in beta by zachn on Friday May 12, 2023 @01:30AM (#35912269)
I wrote an eBPF application that is launched and killed by a PAM session script. It uses the PPID to only record commands and arguments associated with that session. My application was heavily influenced by execsnoop:

https://github.com/iovisor/bcc/blob/master/tools/execsnoop.p...

Re:Session recording for Tailscale SSH in beta by sph on Friday May 12, 2023 @02:19AM (#35912641)
The `script` command is available and pre installed on most Linux distros.
Re:Session recording for Tailscale SSH in beta by jgalt212 on Thursday May 11, 2023 @08:43PM (#35910392)
This seems pretty nice, but having too many logs is yet another attack surface.
Re:Session recording for Tailscale SSH in beta by XorNot on Friday May 12, 2023 @05:53AM (#35914044)
Also reviewing these logs is a pain as soon as you get non-shell things running (i.e. someone spawns a vim session).
Re:Session recording for Tailscale SSH in beta by teeray on Thursday May 11, 2023 @11:41PM (#35911608)
Many folks don’t realize it, but sudo offers a sudoreplay[0] to do something similar. Obviously this won’t cover things they do outside of a sudo session, but you could construct permissions on the machine such that you would require them to use it for things you care about.

This isn’t to trivialize the work of Tailscale (like the famous Dropbox comment). I just wanted to point out a cool thing that sudo does that most people don’t know about.

[0] https://www.sudo.ws/docs/man/1.8.13/sudoreplay.man/

Re:Session recording for Tailscale SSH in beta by rastignack on Friday May 12, 2023 @05:20AM (#35913817)
Looks nice.

However if I scp a script to an audited server, then execute it, would I be able to retrieve the content of the script to have a proper audit trail ?

In other words is the file transfer protocol audited ?

Re:Session recording for Tailscale SSH in beta by theossuary on Friday May 12, 2023 @11:42AM (#35917798)
Semi related, does anyone else feel that the higher tier of tailscale is priced crazy high? I was investigating tailscale for a company and was really sold until I realized we needed SSH logins and that'd cost $18/user. That seems crazy expensive to me. I'd really expected it to be closer to $10/user. Am I crazy? Is this the cost of VPN + basic access control these days?
Re:Session recording for Tailscale SSH in beta by KomoD on Saturday May 13, 2023 @10:03PM (#35934689)
> until I realized we needed SSH logins and that'd cost $18/user

What do you mean? You can use Tailscale SSH in the free plan.

Re:Session recording for Tailscale SSH in beta by theossuary on Monday May 15, 2023 @02:31PM (#35952567)
Like I said, this is for a company implementation, we'd need more than three users
Re:Session recording for Tailscale SSH in beta by KomoD on Tuesday May 16, 2023 @12:18PM (#35963995)
So $6/user then?
Re:Session recording for Tailscale SSH in beta by theossuary on Tuesday May 16, 2023 @03:54PM (#35966903)
Look at their pricing page, it says $18/user/month if you want SSH. The $6/user/month plan doesn't include it. They don't include Funnel in their basic plan either.