在 Web 界面访问命令行

下载并编译 shellinabox

# Clone shellinabox from github
$ git clone https://github.com/shellinabox/shellinabox.git
$ cd shellinabox

# Generate configure
$ autoreconf -i

# Compile
$ ./configure && make

# Check
$ ./shellinabxd --version
ShellInABox version 2.20 (revision e6c25e8)

运行并测试

运行 shellinaboxd

$ ./make-chained-cert.sh > certificate.pem
$ ./shellinaboxd --service /:user:group:HOME:LOGIN

在浏览器打开

run-shellinaboxd.png

添加自定义 style

创建 custom.scss 样式

$background: #000;
$foreground: #fff;

body {
background-color: $background;
color: $foreground;
}

#vt100 .ansiDef {
color: $foreground;
}
#vt100 .ansiDefR {
color: $background;
}
#vt100 #scrollable.inverted .ansiDef {
color: $background;
}
#vt100 #scrollable.inverted .ansiDefR {
color: $foreground;
}

#vt100 .bgAnsiDef {
background-color: $background;
}
#vt100 .bgAnsiDefR {
background-color: $foreground;
}
#vt100 #scrollable.inverted .bgAnsiDef {
background-color: $foreground;
}
#vt100 #scrollable.inverted .bgAnsiDefR {
background-color: $background;
}

#vt100 #cursor.bright {
background-color: whitesmoke;
color: black;
}

编译 sass 文件

$ sudo gem install sass
$ sass custom.scss > custom.css

运行并测试自定义样式

运行 shellinaboxd

$ ./shellinaboxd --service /:user:group:HOME:LOGIN --css=custom.css

在浏览器打开

run-custom-style-shellinaboxd.png