GithubHelp home page GithubHelp logo

sshuttle gives public key error about sshuttle HOT 8 OPEN

tx1845 avatar tx1845 commented on June 17, 2024
sshuttle gives public key error

from sshuttle.

Comments (8)

NgoHuy avatar NgoHuy commented on June 17, 2024 1

@chanmratekoko you ran it successfully, but error with iptables iptables: Bad rule (does a matching rule exist in that chain?). check your iptables, when using sudo, your home was changed to root which did not have your key in /root/.ssh that all.

from sshuttle.

NgoHuy avatar NgoHuy commented on June 17, 2024

because user root does not have your user key in .ssh folder. preauth sudo with any command like: sudo ls then run as normal user, not sudo, it should work.

from sshuttle.

tx1845 avatar tx1845 commented on June 17, 2024

because user root does not have your user key in .ssh folder. preauth sudo with any command like: sudo ls then run as normal user, not sudo, it should work.

I don't understand. I am invoking the command as "myuser" and not as root.

sshuttle -e 'ssh [email protected] -p 2224' -r [email protected]:2224 0.0.0.0/0 --dns

Am I misunderstanding you? Thanks for your time.

from sshuttle.

NgoHuy avatar NgoHuy commented on June 17, 2024

option -e only for choosing ssh or other command, not included options like myuser@host, remove it after you run sudo something, sshuttle need sudo permission to active iptables/nftables

from sshuttle.

tx1845 avatar tx1845 commented on June 17, 2024

option -e only for choosing ssh or other command, not included options like myuser@host, remove it after you run sudo something, sshuttle need sudo permission to active iptables/nftables

I guess I'm stupid for not understanding. How do I revise that code I gave? Tks

from sshuttle.

NgoHuy avatar NgoHuy commented on June 17, 2024

reproduce:
sudo ls
sshuttle -r [email protected]:2224 0.0.0.0/0 --dns

from sshuttle.

chanmratekoko avatar chanmratekoko commented on June 17, 2024

Hello! @NgoHuy

I have the same error after following your instruction.

reproduce: sudo ls sshuttle -r [email protected]:2224 0.0.0.0/0 --dns

sudo ls 
sshuttle -r [[email protected]](mailto:[email protected]):2224 0.0.0.0/0 --dns

Error :

 c : Connected to server.
 # Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.7 (nf_tables):  CHAIN_ADD failed (No such file or directory): chain OUTPUT
# Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables: Bad rule (does a matching rule exist in that chain?).
fw: fw: error: fw: ['iptables', '-t', 'nat', '-D', 'OUTPUT', '-j', 'sshuttle-12300'] returned 1
iptables: Bad rule (does a matching rule exist in that chain?).
fw: fw: error: fw: ['iptables', '-t', 'nat', '-D', 'PREROUTING', '-j', 'sshuttle-12300'] returned 1
fw: fatal: fw: ['iptables', '-t', 'nat', '-I', 'OUTPUT', '1', '-j', 'sshuttle-12300'] returned 4
c : fatal: cleanup: ['/usr/bin/sudo', '-p', '[local sudo] Password: ', '/usr/bin/env', 'PYTHONPATH=/usr/lib/python3/dist-packages', '/usr/bin/python3', '/usr/bin/sshuttle', '--method', 'auto', '--firewall'] returned 99

Then, When I tried with 'sudo'.

sudo sshuttle -r [[email protected]](mailto:[email protected]):2224 0.0.0.0/0 --dns

Error :

Permission denied (publickey).
c : fatal: c : failed to establish ssh session (2)

Could you please help me?

from sshuttle.

chanmratekoko avatar chanmratekoko commented on June 17, 2024

NgoHuy

Thanks for your prompt response. @NgoHuy

I use it on Windows 11 WSL2 "Ubuntu 22.04.2 LTS". But above error occurs.

I was successfully used it on Window 10 WSL2 "Ubuntu 20.04 LTS".

I think, It could be related with iptables. and permissions.

from sshuttle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.