Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing ssh host from browser #365

Closed
guptayash opened this issue Nov 29, 2021 · 6 comments
Closed

Passing ssh host from browser #365

guptayash opened this issue Nov 29, 2021 · 6 comments

Comments

@guptayash
Copy link

Hi,
Is there any way we can pass the ssh-host from the browser? Looks like there was an option earlier as mentioned in this issue, but it doesn't seem to be working for most of the users now.

Any guidance is much appreciated. Thanks

@github-actions
Copy link

Stale issue message

@butlerx
Copy link
Owner

butlerx commented Jan 29, 2022

it appears host is the only value not currently supported as a httpo param

@butlerx
Copy link
Owner

butlerx commented Jan 29, 2022

so I realised the reason it's not an HTTP header was I didn't want people using other wetty servers as ssh-clients to different servers. But i can also see why its be useful if you ran multiple servers and didn't want to run multiple wetty instances

Ill see if i can add a flag to the command line to allow this for those that want it

@butlerx
Copy link
Owner

butlerx commented Jan 29, 2022

Version 2.2.0 has a flag --allow-remote-hosts which will support this

@butlerx butlerx closed this as completed Jan 29, 2022
@guptayash
Copy link
Author

Thank you so much!

@Knucklessg1
Copy link

Knucklessg1 commented Oct 22, 2024

Hello @butlerx , I didn't see this in the documentation and came across this via Google Search. What was the process to do this? I added --allow-remote-hosts to my compose file and I am able to connect to the remote host, however, it does not allow me to enter the password and it automatically closes the connection with permission denied.

This is my compose file

---
services:
  wetty:
    image: "wettyoss/wetty:latest"
    command:
      - --base=/
      - --ssh-host=${SSHHOST} # rasppi.local
      - --ssh-user=${SSHUSER} # test_user
      - --ssh-pass=${SSHPASS} # test_password
      - --allow-remote-hosts
    tty: true
    environment:
      - NODE_ENV='production'
    networks:
      - traefik
    deploy:
      placement:
        constraints:
          - node.labels.name == rasppi
      restart_policy:
        condition: any
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik"
        - "traefik.http.routers.wetty.entrypoints=web"
        - "traefik.http.routers.wetty.rule=Host(`wetty.local`)"
        - "traefik.http.services.wetty.loadbalancer.server.port=3000"
        - "traefik.http.services.wetty.loadbalancer.server.scheme=http"

networks:
  traefik:
    external: true

I am able to navigate to wetty.local which auto logs me into my original host, but when I go to wetty.local/?host=server.local, it navigates to the host, but it does not prompt me for a username or password. I supply those with wetty.local/test_user?host=server.local&pass=test_pass, but this returns an error Cannot GET /test_user

Edit:
Figured it out from this post. #463 (comment)

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants