Add (or document) the ability to SSH through bastion hosts, if possible
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Esamina l’issue correlata #84 e le API Session, Channel, TcpStream e RawFd coinvolte nell’esempio. Determina se un channel o uno stream può fungere da trasporto per una seconda session, quindi definisci se il risultato debba essere implementato come supporto o come documentazione che descriva l’approccio praticabile e le relative limitazioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This relates to #84. I'm not interested in using ssh-agent based key forwarding, but I would like to be able to jump through an intermediate host without relying on netcat.
I'm not sure how feasible this would be, but ideally you could do something like this:
let tcp = TcpStream::connect("bastion-host:22").unwrap();
let mut bastion_session = Session::new().unwrap();
bastion_session.set_tcp_stream(tcp);
bastion_session.handshake().unwrap();
bastion_session.userauth_password("username", "password").unwrap();
bastion_channel = bastion_session.channel_direct_tcpip("target-host", 22, None);
target_session = Session::new().unwrap();
// Here's the crux of it, and where I'm really unsure of how difficult this would be
target_session.set_tcp_stream(bastion_channel); // Or a stream from the bastion?
target_session.handshake.unwrap();
target_session.userauth_password("username", "password").unwrap();
// etcetera
This follows a pattern I've used with other SSH client libraries, e.g.
bastion_connection = await asyncssh.connect("bastion")
target_connection = await asyncssh.connect("target", tunnel=bastion_connection)
It seems like the issue is that a channel/stream doesn't implement the RawFd trait, so we can't pass that as a TCP stream to another session. Would it be possible to implement that trait on either the channel or stream?
I'm working on my first Rust project, so please forgive my ignorance here.
EDIT: I'm also waay too used to working in a high level language, because I did a bit of digging and I doubt this will be simple. Still, it would be good to know what it might look like to do this.
- Lingua principale
- Rust
- Stelle
- 571
- Fork
- 166
- Merge medio
- 1g 18h
- PR unite (30g)
- 5
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/ssh2-rs
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di rust-lang/ssh2-rs
Issue simili
-
area: library data-loss type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alplabai/signex#1740 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsForse già presa @rizumita l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
ServerProperties defaults white-list to true, so a fresh --dedicated server silently locks itselfAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
horizon-rust/horizon#3888 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno