If you want to record your root ssh session  create a file .bash_profile  . and copy below line by line change the email address where you want to recive the SSH log mail.

nano /root/.bash_profile

CURDATE=$(date +%F-%T)

RAND=$RANDOM

EMAILS=”user@example.com otherrecipient@example.com”

script -f -q /tmp/session-$USER-$CURDATE-$RAND.log

for EMAIL in $EMAILS; do

cat “/tmp/session-$USER-$CURDATE-$RAND.log” | mail -s “SSH session transcript for $USER at $CURDATE” $EMAIL

done

rm -f /tmp/session-$USER-$CURDATE-$RAND.log

exit

http://linux-tips.org/article/13/how-to-record-a-linux-session

http://www.gkhan.in/ssh-session-recording-script/

SSH Session Recorder的更多相关文章

  1. IDEA集成SSH Session

    1,在菜单栏选择Tools -> Start SSH Session 2,在SSH Session表单中输入: 3,在IDEA下方会弹出Terminal控制台,直接敲命令即可.  ------- ...

  2. Linux下SSH Session复制

    羡慕Windows下secureCRT的Session Copy功能,一直在寻找Linux下类似的软件,殊不知SSH本身就支持此功能. 特别感谢阿干同学的邮件分享. 详细方法 ? 1 2 3 4 Li ...

  3. SSH的端口转发:本地转发Local Forward和远程转发Remote Forward

    关于使用ssh portforwarding来进行FQ的操作,网络上已经有很多很好的文章,我在这里只是画两个图解释一下. 首先要记住一件事情就是: SSH 端口转发自然需要 SSH 连接,而 SSH ...

  4. Linux UserSpace Back-Door、Rootkit SSH/PAM Backdoor Attack And Defensive Tchnology

    catalog . 引言 . Pam后门 . SSH后门 . Hijacking SSH . Hijacking SSH By Setup A Tunnel Which Allows Multiple ...

  5. Using SSH on Linux

    This document covers the SSH client on the Linux Operating System and other OSes that use OpenSSH. W ...

  6. 转:linux 修改sftp服务默认提供者sshd的session timeout

    ssh连接超时问题解决方案: 1.修改server端的etc/ssh/sshd_config ClientAliveInterval 60 #server每隔60秒发送一次请求给client,然后cl ...

  7. IntelliJ IDEA使用SSH功能

    Tools→Start SSH session... 选择Edit credentials... 输入SSH登录信息即可 输入SSH登录信息,Port默认为22 来自为知笔记(Wiz)

  8. SSH Tunneling Explained

    转载: http://chamibuddhika.wordpress.com/2012/03/21/ssh-tunnelling-explained/ March 21, 2012 by Buddhi ...

  9. phpstorm之ssh链接远程Linux服务器

    save ssh session inPHPstorm. open PHPstorm,open File,> Settings >search for 'Deployment' > ...

随机推荐

  1. Remove Element,Remove Duplicates from Sorted Array,Remove Duplicates from Sorted Array II

    以下三个问题的典型的两个指针处理数组的问题,一个指针用于遍历,一个指针用于指向当前处理到位置 一:Remove Element Given an array and a value, remove a ...

  2. go learning notes

    1)  cgo $go install test.go # command-line-arguments /usr/bin/ld: unrecognized option '--build-id=no ...

  3. 以Ajax的方式访问数据库

    一:以Ajax的方式显示数据 我们都知道,如果用Ajax程序去加载一个动态页,则加载的实际上是这个动态页执行完毕后生成的静态HTML代码字符串. 1.以原有的格式显示数据 <?php heade ...

  4. win10使用python开发工具pycharm首次安装配置

    刚才在网页上写了一半,结果网页出现了意外,然后,再打开什么都没有了,说多都是泪啊,我以为博客会自动保存草稿的呢,看来是我高估了它的功能然而现在根本没有心情写了... 因为出现了意外,果断的不在网页端编 ...

  5. Visual Studio Code和Docker开发asp.net core和mysql应用

    Visual Studio Code和Docker开发asp.net core和mysql应用 .net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对 ...

  6. linux第七章《档案与目录管理》重点回顾

  7. shell基础——变量定义

    快速参考: 变量定义格式: 变量名=值 str1="hello world" # define a string var str2=hello # define a string ...

  8. Linux学习之第十九、条件判断

    原文地址:http://vbird.dic.ksu.edu.tw/linux_basic/0340bashshell-scripts_4.php 条件判断式 只要讲到『程序』的话,那么条件判断式,亦即 ...

  9. cocos2d-x3.0 SpriteFrameCache

    bool HelloWorld::init() { ////////////////////////////// // 1. super init first if ( !Layer::init() ...

  10. hdu 1520Anniversary party(简单树形dp)

    Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...