我正在使用shellinabox在线ssh客户端。我已经配置了一个代理外壳,它通过proxy_pass配置将客户端重定向到本地主机。每当我尝试访问外壳程序时,都会出现503错误。在错误日志中,错误说明如下:
2019/03/21 01:22:19 [error] 9569#9569: *13 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED], server: devserver, request: "GET / HTTP/1.1", upstream: "https://127.0.0.1:4200/", host: "[REDACTED]"
~
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 433 ssl;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name DEVSERVER;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
auth_basic "Password Required!";
auth_basic_user_file /etc/apache2/.htpasswd;
proxy_pass https://127.0.0.1:4200;
}
# pass PHP scripts to FastCGI server
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
25,2-9 47%
有人可以提出解决方案吗,或者有人可以为我提供访问和保护Shellinabox终端的更好解决方案?最终目标是禁用所有为SSH保存的命令,并托管一个私有的在线ssh客户端,这样我就可以在缺少管理员权限的计算机上使用它来安装SSH客户端(如Putty)。