Running what you did, just a bare ssh-agent, will not set the environment variables for you. And so, no other commands know that the ssh-agent is running or where to find it.
You need to run eval $(ssh-agent) which will take the output of the command and eval it, which means that the shell will execute the output. Or use back-ticks instead of $(command). I just couldn’t type them because the Mark-Down here has no way to escape the back-ticks.
Hm that explains why the GitHub tutorial is what it is, but it actually worked without eval. I just ssh-add mykey again and git picked it up just fine, could push with no issues. That could be down to some default config in Fedora though, I don’t know…
I still wanna get the automatic thing working though (just wanted to have that pushed out).
Oh, dd overwrite three times should destroy the data for 99.999999% of the population and not many will be able to access the previous data after that except for specialized IT phorensics. Why anyone would want to take your specific harddrive and search for previous data, a very task-intensive and laborious process, is beyond me.
I still recommend replacing HDD to SSD though, but that’s just me.
The $HOME/.ssh/config file doesn’t get read by ssh-agent, AFAIK. Instead it gets used by commands like ssh, scp, sftp, rsync, etc. The magic won’t happen until you run ssh github. Then ssh-add -l should show something.
@zlynx has a point about how you incorrectly invoked ssh-agent, but if there was no agent running, and with SSH_AUTH_SOCK set in your shell, pointing to the right one, ssh-add -l would have errored, so I guess your system started it for you, elsewhere.
Hm I was afraid that that was going to be the case Although I don’t think I can actually (really) SSH into Github, I just tried it and it seems to try loading the key, but it’s telling me the file doesn’t exist even though it clearly does (including correct permissions) and is pointing to the right one And adding it manually does work as well, so I’m not sure why it’s not finding it…
[[email protected]]~% ls -l $HOME/.ssh
-rw-r--r--. 1 tarulia tarulia 125 Jun 10 08:15 config
-rw-------. 1 tarulia tarulia 951 Sep 11 2015 github_private
-rw-rw-r--. 1 tarulia tarulia 1574 Apr 18 15:15 known_hosts
-rw-------. 1 tarulia tarulia 869 Jun 10 2015 ssh_private_key.ppk
-rw-r--r--. 1 tarulia tarulia 294 Jun 10 2015 ssh_public_key
[[email protected]]~% cat .ssh/config
[[email protected]]~% ssh github
no such identity: $HOME/.ssh/github_private: No such file or directory
[email protected]: Permission denied (publickey).
[[email protected]]~% ssh-add $HOME/.ssh/github_private
Enter passphrase for /home/tarulia/.ssh/github_private:
Identity added: /home/tarulia/.ssh/github_private (/home/tarulia/.ssh/github_private)
Could it be because of the passphrase? But I thought it should just ask for that at that point
And yes I know $HOME was unnecessary to specify, I just used it because it was in the error message to see what happens
That seems to be the case, I didn’t manually invoke the agent since the last restart but I’m still getting something back:
So I have a script wrapper that I use for… wait for it… running scripts.
I added a feature to it over the last week so it prints possible command completions. I want to use ? for this, but zsh is seeing it as globbing unless I quote or escape it. Is there anyway around this without disabling globbing altogether?
-h, --help will be something else, so can’t use that as a replacement. I like using ? in network cli so thought I’d use it.
Ok, this one is new to me. So I’m sitting in Gnome, with a Bluetooth mouse connected.
All of a sudden, all windows are unresponsive - except the currently active one. The mouse pointer works, I can click fine inside the current window with no problems, but, as soon as I try to click outside the current window, neither click nor mouse position registers for that window.
I have narrowed it down to either Bluetooth or hardware fault; If I connect another mouse (USB) the error is still visible. If I then disconnect the BT mouse, however, the error disappears and I have once again normal behaviour with the USB mouse.
Anyone around that has experience with this? The mouse worked perfectly for 6 months until now.
Well… duh, I should have thought of that brain lag is strong in this one
BUT - The good news: it works with SSH
[[email protected]]~/Development/obs-studio.spec% ssh github
Enter passphrase for key '/home/tarulia/.ssh/github_private':
PTY allocation request failed on channel 0
Hi mihawk90! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
However, it didn’t work with Git right away, it wasn’t loading the key. When I tried ssh github.com instead of just ssh github I realised that I was getting the same error (i.e. not loading the key), so I figured it wasn’t finding the config because of however Git calls ssh.
I had to change the Host line to Host github.com instead for it to load the key, and that worked. If this were a target with shell-access I’d use Host github github.com so I could use ssh github for shorter shell access and still have Git work. I guess there’s also a Git config that would let me use a different name but since this is for GitHub only, it doesn’t matter.
I have a udev automation issue and I am wrecking my brain for a week now but probably just missing the obvious.
I have a USB device that I want to pass through to a guest running on KVM. There are a few tutorials how to do that, so I’ve followed those. Basically I created the rule in /etc/udev/rules.d/90-libvirt-usb.rules containing
The command to run works when run manually. However when I plug the device in, a loop is triggered. It seems that attaching a device to a guest will basically remove it from the host, thus triggering the detach command.
What am I missing?
The host OS is Ubuntu 20.04.2 LTS currently on kernel 5.4.0-73 .
Thanks for the quickfix hints, unfortunately non of them worked yet.
Here’s the shortest output of udevadm monitor I could grab when plugging in and then unplugging the usb device (it is a Zigbee dongle BTW). The output is without the -p flag. If that helps, I can paste, it will be long though.
I’ve been eyeballing the output of udevadm monitor -p but I don’t seem to see what differentiates the passthrough event from the others.
I’m not that familiar with udev, but I have quite some dev experience. Am I correctly assuming that udev events have a sequence and the addition events increase in specificity along the way the system identifies the device. Thus my approach would have to be to capture an add event before the device gets bound to the host so there are no removes? And/or to make the remove rule so specific that it does not trigger when the passthrough happens?