梅林固件安装Shadowsocks

登录路由器后台,系统管理>系统设置,将Enable SSH设置为LAN only。 通过SSH登录路由器,参考以下执行,在此推荐Putty。 cd /tmp wget https://github.com/hq450/fancyss_history_package/raw/master/fancyss_arm/shadowsocks_4.1.1.tar.gz tar -zxvf shadowsocks_4.1.1.tar.gz cd shadowsocks chmod +x install.sh ./install.sh 2017年11月19日 14:40:36: 固件平台【koolshare merlinarmv7l】符合安装要求,开始安装插件! 2017年11月19日 14:40:36: 清理旧文件 2017年11月19日 14:40:36: 开始复制文件! 2017年11月19日 14:40:36: 复制相关二进制文件! 2017年11月19日 14:40:42: 创建一些二进制文件的软链接! 2017年11月19日 14:40:42: 复制ss的脚本文件! 2017年11月19日 14:40:44: 复制网页文件! 2017年11月19日 14:40:44: 移除安装包! 2017年11月19日 14:40:44: 为新安装文件赋予执行权限... 2017年11月19日 14:40:44: 设置一些默认值 2017年11月19日 14:40:47: 一点点清理工作... 2017年11月19日 14:40:47: 插件安装成功,你为什么这么屌?! 2017年11月19日 14:40:47: 更新完毕,请等待网页自动刷新! 完成后重启路由器,在软件中心中即可看到影梭已经安装成功! ...

十一月 19, 2017 · JQX

使用Google Authenticator两步验证加强SSH登录

Google Authenticator开源版主页 https://github.com/google/google-authenticator 安装Google Authenticator Ubuntu通过以下命令安装: apt-get install libpam-google-authenticator CentOS通过以下命令安装: yum install google-authenticator 其他系统可以通过源码编译安装 git clone https://github.com/google/google-authenticator-libpam.git cd google-authenticator-libpam/ ./bootstrap.sh ./configure make make install 注意:在Debian7中执行./configure时可能存在以下错误提示 configure: error: Unable to find the PAM library or the PAM header files 在此需要安装libpam0g-dev和libtool apt-get -y install libpam0g-dev libtool 设置Google Authenticator 在手机端搜索安装Google Authenticator google-authenticator Do you want authentication tokens to be time-based (y/n) y 然后出现二维码,使用手机端Google Authenticator扫码,接下来服务器端继续设置 如果没有出现二维码,可以将提示的以https://www.google.com/chart?开头的连接复制到浏览器中,就可以看到二维码了 Do you want me to update your "/root/.google_authenticator" file (y/n) y Do you want to disallow multiple uses of the same authentication token? This restricts you to one login about every 30s, but it increases your chances to notice or even prevent man-in-the-middle attacks (y/n) Do you want to disallow multiple uses of the same authentication token? This restricts you to one login about every 30s, but it increases your chances to notice or even prevent man-in-the-middle attacks (y/n) y By default, tokens are good for 30 seconds and in order to compensate for possible time-skew between the client and the server, we allow an extra token before and after the current time. If you experience problems with poor time synchronization, you can increase the window from its default size of 1:30min to about 4min. Do you want to do so (y/n) y If the computer that you are logging into isn't hardened against brute-force login attempts, you can enable rate-limiting for the authentication module. By default, this limits attackers to no more than 3 login attempts every 30s. Do you want to enable rate-limiting (y/n) y 接下来将Google Authenticator验证配置到SSH登录中 ...

一月 28, 2016 · jqx
ssh

使用SSH密匙登录Github

相较于旧的RSA,更加推荐ED25519 $ ssh-keygen -t ed25519 -C "[email protected]" 生成ssh密匙文件 ssh-keygen -t rsa -C "[email protected]" 接下来会提示输入密码,推荐自定义密码,当然也可以置空 Enter passphrase(empty for no passphrase): Enter same passphrase again: 完成后会在用户目录下的.ssh文件夹中新建id_rsa与is_rsa.pub两个文件。 添加ssh密匙到github用户 登录至github.com,点击右上角的Account Settings 在左侧选择SSH Keys菜单,然后在右侧点击Add SSH Key按钮 将上一步生成的id_rsa.pub文件内容复制进去保存。 本地连接至github.com ssh -T [email protected] 如果前面设置了passphrase,那么就按照提示输入passphrase。如果置空的话,就直接点击回车。成功后会有如下提示: Hi alair! You`ve successfully authenticated, but GitHub does note provide shell access. 参考以上设置完成后,以后git push时就不需要每次输入密码了!

九月 3, 2013 · JQX

Nokia N900 and SSH

N900采用的maemo是基于debian的linux系统,通过自带的application manager管理软件时,操作体验还有待改进,所以这里推荐通过ssh连接,使用cli来进行相应操作。 需要在手机端安装OpenSSH来开启SSH服务,在application manager的system目录下,找到openssh Client and Server安装,当然如果你不需要在手机端进行SSH登陆的话,那可以只安装server即可。 安装时会提示输入密码,这个就是以后连接手机SSH的服务密码。 安装完成后SSH server会默认启动,现在你可以通过wifi连接局域网,然后需要知道自己当前的IP(可以通过Tp-link后台查看,或者手机端安装Personal IP Address开显示),再推荐安装SSH Status and Swither,可以在手机的status显示SSH状态,并管理SSH server启动/停止。 然后推荐使用Putty进行链接,在CLI模式下管理软件,可以在http://maemo.org/上查看软件目录以及简介,通过apt-get install命令来安装,以下为一些apt-get使用简介 apt-get使用方法 apt-get [选项] 命令 apt-get [选项] install|remove pkg1 [pkg2 ...] apt-get [选项] source pkg1 [pkg2 ...] 命令: update - 更新软件列表 upgrade - 升级软件 install - 安装软件(pkg 是软件名) remove - 删除软件 autoremove - 自动删除一些无效的软件 purge - 删除软件并清理配置 source - 下载软件源码 build-dep - 配置软件源码的build-dependencies dist-upgrade - 升级系统 clean - 清除建立的软件包列表 autoclean - 同上 check - 校验软件包是否有异常 选项: ...

四月 2, 2012 · JQX

LNMP使用实例

安装LNMP 更新系统 yum check-update yum update 安装Screen yum install screen 开始安装Lnmp screen -S lnmp wget -c http://soft.vpser.net/lnmp/lnmp0.8.tar.gz //最新版请查阅lnmp官网 tar zxvf lnmp0.8.tar.gz ./lnmp0.8/centos.sh | tee lnmp.log //输出log文件,以备出错时查阅 接下来按照提示设定域名和MysQL密码,程序会自动下载相关程序,而后编译安装 安装PureFTP ./lnmp0.8/pureftp.sh 按提示输入MySQL和Ftp管理员密码,安装完成后可以通过http://vpsip/ftp/来登录管理ftp帐号 使用Lnmp 添加虚拟主机 /root/vhost.sh 按照提示填入域名、目录、rewrite规则文件,如下所示: root@buyvm256:~#/root/vhost.sh ========================================================================= Add Virtual Host for LNMP V0.9 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to add virtual host for nginx For more information please visit http://www.lnmp.org/ ========================================================================= Please input domain: //添加域名 (Default domain: www.lnmp.org):unixetc.com =========================== domain=unixetc.com =========================== Do you want to add more domain name? (y/n) //添加更多域名 y Type domainname,example(bbs.vpser.net forums.vpser.net luntan.vpser.net): www.unixetc.com =========================== domain list=www.unixetc.com =========================== Please input the directory for the domain:unixetc.com : //网站目录 (Default directory: /home/wwwroot/unixetc.com): =========================== Virtual Host Directory=/home/wwwroot/unixetc.com =========================== =========================== Allow Rewrite rule? (y/n) //重写规则 =========================== y Please input the rewrite of programme : wordpress,discuz,typecho,sablog,dabr rewrite was exist. (Default rewrite: other):wordpress //选择重写规则 =========================== You choose rewrite=wordpress =========================== =========================== Allow access_log? (y/n) //是否记录log =========================== n Press any key to start create virtul host... 然后,登录http://vpsip/ftp/添加ftp帐号,http://vpsip/phpmyadmin/编辑数据库 ...

三月 23, 2012 · JQX