Jan 18 2012

允许scp传输文件,但不允许ssh登录

Category: 技术ssmax @ 20:10:30

以前在上海做过一次,那次是只允许sftp,但是不允许登录,我记得是用新版openssh的chroot来做的,今天也碰到同样情况,这次是允许scp,不允许登录,查了一下baidu,找到一个非常淫荡的方法,分享一下:

更改用户目录下面的.profile 文件(bash就改 .bash_profile)

第一行插入 exit

用户登录以后就自动执行该脚本并退出。。。一般用用就够了,哈哈。果然非常淫荡啊!

One Response to “允许scp传输文件,但不允许ssh登录”

  1. Jimmy says:

    强大~~

Leave a Reply

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word