bt5开机自动登录以及开启ssh

来源:互联网 发布:js实现日期选择器区间 编辑:程序博客网 时间:2024/06/05 16:35

最近用bt5作为服务器编译安卓,遇见了如下问题,在此记录问题

1:开机自动登录

apt-get install rungetty
echo "exec /sbin/rungetty tty1 --autologin root" >>/etc/init/tty1.conf
echo startx >>/root/.bash_profile

2开启ssh服务

root@linuck:/#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

root@linuck:/#ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

root@linuck:/#sshd-generate

当然先要安装openssh-server

自动启动:

        用 sysv-rc-conf   软件 

         每次putty连接时 都要 /etc/init.d/ssh start  

        所以要开机启动项 

 

         安装 sysv-rc-conf    apt-get install sysv-rc-conf 

       开启  /etc/ sysv-rc-conf     


       untun下开启  sysv-rc-conf

 

      选项  空格是 选择  X 是 选择上了 启动级别 分为 0-6 

    0 系统停机状态  1 单用户或系统维护状态  2~5 多用户状态  6 重新启动

      q 保存  reboot  重新 putty连接

我选择的是3 和s就可以了。