ssh badly-managed-server cat file | jq .
I actually made a wrapper that just guesses (based on which parser returns error basically) type of serializing and then displays it nicely.
Then again, why not scp the file to local? Bandwidth usage isn’t good for the environment.
sshmount () { SSHFS_SERVER_DIR='/home/user' if [ "z$1" = "z" ] then echo "specify server [server_dir]" return fi SSHFS_SERVER=$1 if [ "z$2" != "z" ] then SSHFS_SERVER_DIR=$2 fi SSHFS_TARGET_DIR="/home/user/mnt/$SSHFS_SERVER" echo "Mounting $SSHFS_SERVER:$SSHFS_SERVER_DIR into $SSHFS_TARGET_DIR" mkdir -p $SSHFS_TARGET_DIR sshfs -o idmap=user -o allow_other -o kernel_cache $SSHFS_SERVER:$SSHFS_SERVER_DIR $SSHFS_TARGET_DIR && cd $SSHFS_TARGET_DIR } sshmount servername
I actually made a wrapper that just guesses (based on which parser returns error basically) type of serializing and then displays it nicely.