Reading ~/.ssh/config

[?]
Dec 4, 2020, 7:44 PM
SZWBLWZ4LUJZHTSYOIGJMXM7KPCGWJFPKLHYA5MHY7UTPNLZV5KQC

Dependencies

  • [2] 367UBQ6K Forwarding SSH stderr, and progress bar for push
  • [3] WLUID7NA Do not block when downloading more than 100 changes over SSH
  • [4] WIORLB47 Version bump
  • [5] 76PCXGML Pushing to, and pulling from the local repository
  • [6] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [7] NX5I5H53 New published versions
  • [8] WI5BS6BS New published versions
  • [9] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [10] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [11] RR65HCKO Thrussh versions
  • [12] 3S4DR77Z Version updates
  • [13] 2K7JLB4Z No pager on Windows
  • [14] SAGSYAPX Various version bumps
  • [15] OUWD436A Version bump
  • [16] OCBM7IFE New release: pijul-1.0.0-alpha.8
  • [17] UDHP4ZVB Fixing SSH asynchronicity issues

Change contents

  • edit in pijul/src/remote/ssh.rs at line 1
    [5.25625][5.25625:25647]()
    use std::borrow::Cow;
  • edit in pijul/src/remote/ssh.rs at line 40
    [5.26241]
    [5.26241]
    addr: &'a str,
  • edit in pijul/src/remote/ssh.rs at line 42
    [5.26260][5.26260:26299]()
    port: u16,
    user: Cow<'a, str>,
  • replacement in pijul/src/remote/ssh.rs at line 43
    [5.26318][5.26318:26372]()
    addr: String,
    resolved: std::net::SocketAddr,
    [5.26318]
    [5.26372]
    config: thrussh_config::Config,
  • edit in pijul/src/remote/ssh.rs at line 53
    [5.26584][5.26584:26728]()
    let user = if let Some(u) = cap.name("user") {
    Cow::Borrowed(u.as_str())
    } else {
    Cow::Owned(whoami::username())
    };
  • replacement in pijul/src/remote/ssh.rs at line 54
    [5.26779][5.26779:27289]()
    let port: u16 = cap
    .name("port")
    .map(|x| x.as_str().parse().unwrap())
    .unwrap_or(22);
    let path = cap.name("path").unwrap().as_str();
    let addr = format!("{}:{}", host, port);
    use std::net::ToSocketAddrs;
    if let Ok(mut res) = addr.to_socket_addrs() {
    let resolved = res.next().unwrap();
    Some(Remote {
    host,
    port,
    user,
    path,
    addr,
    resolved,
    })
    } else {
    None
    [5.26779]
    [5.27289]
    let mut config =
    thrussh_config::parse_home(&host).unwrap_or(thrussh_config::Config::default(host));
    if let Some(port) = cap.name("port").map(|x| x.as_str().parse().unwrap()) {
    config.port = port
    }
    if let Some(u) = cap.name("user") {
    config.user.clear();
    config.user.push_str(u.as_str());
  • edit in pijul/src/remote/ssh.rs at line 64
    [5.27295]
    [5.27295]
    let path = cap.name("path").unwrap().as_str();
    Some(Remote {
    addr,
    host,
    path,
    config,
    })
  • replacement in pijul/src/remote/ssh.rs at line 74
    [5.27320][5.27320:27411]()
    pub async fn connect(&self, name: &str, channel: &str) -> Result<Ssh, anyhow::Error> {
    [5.27320]
    [5.27411]
    pub async fn connect(&mut self, name: &str, channel: &str) -> Result<Ssh, anyhow::Error> {
  • replacement in pijul/src/remote/ssh.rs at line 80
    [5.27560][5.27560:27597]()
    addr: self.addr.clone(),
    [5.27560]
    [5.27597]
    addr: self.config.host_name.clone(),
  • edit in pijul/src/remote/ssh.rs at line 85
    [5.27694]
    [5.27694]
    let stream = self.config.stream().await?;
  • replacement in pijul/src/remote/ssh.rs at line 87
    [5.27761][5.27761:27986]()
    use std::net::ToSocketAddrs;
    debug!("client: {:?}", client.addr);
    let addr = client.addr.to_socket_addrs()?.next().unwrap();
    let mut h = thrussh::client::connect(config, &addr, client).await?;
    [5.27761]
    [5.27986]
    let mut h = thrussh::client::connect_stream(config, stream, client).await?;
  • replacement in pijul/src/remote/ssh.rs at line 92
    [5.28092][5.28092:28167]()
    let authenticated = self.auth_agent(&mut h).await.unwrap_or(false)
    [5.28092]
    [5.28167]
    let authenticated = self
    .auth_agent(&mut h, &mut key_path)
    .await
    .unwrap_or(false)
  • replacement in pijul/src/remote/ssh.rs at line 121
    [5.28808][5.28808:28905]()
    async fn auth_agent(&self, h: &mut thrussh::client::Handle) -> Result<bool, anyhow::Error> {
    [5.28808]
    [5.28905]
    async fn auth_agent(
    &self,
    h: &mut thrussh::client::Handle,
    key_path: &mut PathBuf,
    ) -> Result<bool, anyhow::Error> {
  • replacement in pijul/src/remote/ssh.rs at line 128
    [5.29032][5.29032:29092]()
    let identities = agent.request_identities().await?;
    [5.29032]
    [5.29092]
    let identities = if let Some(ref file) = self.config.identity_file {
    key_path.push(file);
    key_path.set_extension("pub");
    let k = thrussh_keys::load_public_key(&key_path);
    key_path.pop();
    if let Ok(k) = k {
    vec![k]
    } else {
    return Ok(false);
    }
    } else {
    agent.request_identities().await?
    };
  • replacement in pijul/src/remote/ssh.rs at line 148
    [5.29394][5.29394:29474]()
    match h.authenticate_future(self.user.as_ref(), key, a).await {
    [5.29394]
    [5.29474]
    match h.authenticate_future(&self.config.user, key, a).await {
  • replacement in pijul/src/remote/ssh.rs at line 178
    [5.30537][5.30537:30582]()
    for k in &["id_ed25519", "id_rsa"] {
    [5.30537]
    [5.30582]
    let mut keys = Vec::new();
    if let Some(ref file) = self.config.identity_file {
    keys.push(file.as_str())
    } else {
    keys.push("id_ed25519");
    keys.push("id_rsa");
    }
    for k in keys.iter() {
  • replacement in pijul/src/remote/ssh.rs at line 194
    [5.30825][5.30825:30898]()
    .authenticate_publickey(self.user.as_ref(), Arc::new(k))
    [5.30825]
    [5.30898]
    .authenticate_publickey(&self.config.user, Arc::new(k))
  • replacement in pijul/src/remote/ssh.rs at line 210
    [5.31323][5.31323:31356]()
    self.user, self.host
    [5.31323]
    [5.31356]
    self.config.user, self.config.host_name
  • replacement in pijul/src/remote/ssh.rs at line 212
    [5.31370][5.31370:31438]()
    h.authenticate_password(self.user.to_string(), &pass).await
    [5.31370]
    [5.31438]
    h.authenticate_password(self.config.user.to_string(), &pass)
    .await
  • edit in pijul/src/remote/ssh.rs at line 327
    [5.34230]
    [5.1248]
    }
    fn channel_eof(
    self,
    _channel: thrussh::ChannelId,
    session: thrussh::client::Session,
    ) -> Self::FutureUnit {
    Box::pin(async move {
    *self.state.lock().await = State::None;
    Ok((self, session))
    })
  • edit in pijul/src/remote/ssh.rs at line 347
    [2.183]
    [2.183]
    debug!("extended data {:?}, {:?}", std::str::from_utf8(data), ext);
  • replacement in pijul/src/remote/ssh.rs at line 351
    [2.268][2.268:316](),[2.316][2.316:365]()
    let mut stderr = std::io::stderr();
    let result = stderr.write_all(data);
    [2.268]
    [2.365]
    let stderr = std::io::stderr();
    let mut handle = stderr.lock();
    let result = handle.write_all(data);
  • edit in pijul/src/remote/ssh.rs at line 747
    [3.426]
    [5.8856]
    if c.is_empty() {
    return Ok(());
    }
  • replacement in pijul/src/remote/mod.rs at line 63
    [5.341][5.341:394]()
    return if let Some(ssh) = ssh_remote(name) {
    [5.341]
    [5.54008]
    return if let Some(mut ssh) = ssh_remote(name) {
  • replacement in pijul/src/remote/mod.rs at line 97
    [5.55181][5.791:833]()
    if let Some(ssh) = ssh_remote(name) {
    [5.55181]
    [5.833]
    if let Some(mut ssh) = ssh_remote(name) {
  • replacement in pijul/Cargo.toml at line 59
    [5.197741][5.263:283]()
    thrussh = "0.29.13"
    [5.197741]
    [4.97]
    thrussh = "0.29.15"
  • edit in pijul/Cargo.toml at line 61
    [4.122]
    [5.197800]
    thrussh-config = "0.4"