butlerx / wetty

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
https://butlerx.github.io/wetty
MIT License
4.26k stars 670 forks source link

docker run wettyoss/wetty fails with login[47] error #464

Open PurnaChandraPanda opened 1 year ago

PurnaChandraPanda commented 1 year ago

From ubuntu terminal, run:

$ docker pull wettyoss/wetty:latest
$ docker run -it -p 3002:3000 wettyoss/wetty:latest --shh-user=user1 --ssh-pass=mypwd

On browser, access the app as http://localhost:3002/wetty. Provided the correct username and password values, but still fails as "Login incorrect".

28c1d1d02bcf login: user1
Password: 
Login incorrect
28c1d1d02bcf login: 

On the other docker run session, I could see it flags as login[47] error with invalid password for unknown.

{"label":"Wetty","level":"info","message":"Connection accepted.","timestamp":"2023-03-10T05:03:28.331Z"}
{"address":"localhost","label":"Wetty","level":"info","message":"Process Started on behalf of user","pid":47,"timestamp":"2023-03-10T05:03:28.345Z"}
login[47]: invalid password for 'UNKNOWN' on 'pts/1' from 'localhost'

I could validate in ubuntu terminal that username and password are correct values, but /wetty terminal does not accept it. How else could we validate from "wetty", why the user/pwd combination is declined? Could anyone please share some thoughts??

PurnaChandraPanda commented 1 year ago

@butlerx Any thoughts on this login challenge?

PurnaChandraPanda commented 1 year ago

any comments how to address it?

Aledangelo commented 1 year ago

I have same issue. Do you know if there are default credentials to use?

inceabdullah commented 10 months ago

Please pass host users into the container like

docker run -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v `pwd`:`pwd`  -it --rm --net host --name wetty wettyoss/wetty  

For other running as a host user within a Docker methods: Ref

eded333 commented 8 months ago

A bit of necromancy... This is my docker compose deployment that worked for me:

services:
  wetty:
    image: wettyoss/wetty:latest
    container_name: wetty
    environment:
      - PUID=1000
      - PGID=1000
    user: 1000:1000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
    network_mode: host
    restart: unless-stopped