If you can use tmux or screen, they have the ability to save the scrollback buffer to a file.
Unlike screendump, which is Linux-only, tmux and screen are available for BSD-based OSes too (e.g. macOS, FreeBSD) and won't require special permissions.