By using lsof command,we can view active ssh connections on your server.So let’s find out how. lsof command is used to list open files like disk files, pipes, network sockets and devices opened by all processes.