greycat 2017-01-31 09:45:22
You shouldn't be starting ssh-agent in .bashrc because then you will get one for EVERY TERMINAL you open.
n4dir 2017-01-31 09:45:39
yeah, that was the problem too. now i remember
greycat 2017-01-31 09:45:53
You want to start ssh-agent in your login dot file, which may be ~/.profile if you login on a console, or ~/.xsession if you login through some DMs, etc.
n4dir 2017-01-31 09:47:36
k, so per try-and-error i got it correct, it seems
Iridos 2017-01-31 09:48:07
uh, I'm starting ssh-agent once manually and have an eval in .bashrc that makes it active on each teminal
Iridos 2017-01-31 09:48:35
I thought that was the only way to do it? I mean… I have to type the passphrase for it to unlock the key anyway…
n4dir 2017-01-31 09:49:05
Iridos: and if you open another terminal the key is still unlocked?
Iridos 2017-01-31 09:49:46
n4dir, yes, because you set the environment variables to connect to the ssh agent… and that has the key unlocked
n4dir 2017-01-31 09:50:21
weird. I didn't get it working that way for me.
Iridos 2017-01-31 09:50:45
uh, can't find it on the laptop's .bashrc/.profile, give me a moment
Iridos 2017-01-31 09:51:01
well, I can say how I start it…
greycat 2017-01-31 09:52:35
.xsession .xinitrc .xsessionrc .gnomerc
n4dir 2017-01-31 09:52:36
main problem for me was that i opened another tab of the terminal, and no more key. Hence i came up with .profile
n4dir 2017-01-31 09:53:18
and, like greycat said, each new tab or terminal started ssh-agent again, so i had tons of instances running
Plushtux 2017-01-31 09:54:19
Debian Stretch as server - not really a good idea
somiaj 2017-01-31 09:54:46
yup, wait for the release so it has security support.
greycat 2017-01-31 09:55:08
and so that it isn't a moving target
Iridos 2017-01-31 09:55:55
n4dir, well, I start ssh (from ^R history) as ssh-add -L >/dev/null || ssh-add ; autossh user@host
n4dir 2017-01-31 09:56:54
not that i would be good at the subject, but i can't see ssh-agent being started there?
Iridos 2017-01-31 09:57:09
n4dir, and in .profile, I have a case $- in \n *i*) eval `keychain -q --eval id_rsa ` ;; \n *) return;; \n esac
Iridos 2017-01-31 09:57:47
n4dir, uh… it's already started … uh… somewhere
Iridos 2017-01-31 09:57:59
n4dir, maybe should 'orf documented it :P
Iridos 2017-01-31 09:58:17
n4dir, I think keychain starts one if it isn't there…
n4dir 2017-01-31 09:58:35
don't know keychain (shame on me ). Some graphical environments handle that problem (gnome and kde, xfce if configured)
n4dir 2017-01-31 09:58:46
yeah, Iridos, perhaps that.
Iridos 2017-01-31 09:59:10
anyway… keychain is the key… err… chain… to get it working nicely
Iridos 2017-01-31 10:00:44
and I guess that ssh-add I keep doing is superfluous… if I add that to my .profile that starts the ssh-agent with keychain
Iridos 2017-01-31 10:01:04
or maybe not
n4dir 2017-01-31 10:01:39
Well: if i added the ssh-add to .profile, i was bugged with it during each login (3 or 4 keys). Hence i gave up on it, but use "ssh-add" whenever i need a key
Iridos 2017-01-31 10:02:38
yeah… I think there may be good reasons why I have it the way I have
Iridos 2017-01-31 10:02:54
but it's neat. I used to use passphrase-free keys… this completely replaced them
Iridos 2017-01-31 10:03:43
there might not really be a huge security increase on an encrypted partition anyway… but as I usually only hibernate, it's nearly zero extra effort
ElDiabolo 2017-01-31 10:04:13
How do Icheck if kms is enabled.
n4dir 2017-01-31 10:05:20
my main concern is not to have to retype the password again and again, hence keys.
Iridos 2017-01-31 10:05:55
having to type a passphrase each time to unlock the key isn't really better ^ ^
n4dir 2017-01-31 10:06:23
lol. no. but having it stored is good :-)
Iridos 2017-01-31 10:06:42
and I have nightly cronjobs on one machine… I set the variables for the ssh-agent inside the crontab
Iridos 2017-01-31 10:07:02
that means having to re-edit that on each non-hibernate reboot, which I don't do often
dTal 2017-01-31 10:07:11
it's better from a security perspective - if the password is compromised you can change it, without changing the key
n4dir 2017-01-31 10:08:12
first of all someone would need to have your private key.
n4dir 2017-01-31 10:09:09
saying is: if in doubt, protect it with your life
dTal 2017-01-31 10:09:37
for example if you discovered your machine had a keylogger
Iridos 2017-01-31 10:09:41
if someone is root or my user on the system, they have the key and they have the passphrase via gdb or so from the agent…
Iridos 2017-01-31 10:09:58
it's a bit better than a passwordless key, but not by much imo
dTal 2017-01-31 10:10:29
ah I meant better than straight password auth
Iridos 2017-01-31 10:10:32
specially as that partition is encrypted and you could (probably) only get the key from the live system, not from the hard disk
n4dir 2017-01-31 10:12:14
don't think much about that, cause here there are no other root users
Iridos 2017-01-31 10:12:53
I mean someone breaks into the machine via some root exploit
n4dir 2017-01-31 10:12:59
more compared to being able to brute-force passwords (instead of ssh-key authentication)
Iridos 2017-01-31 10:13:25
or a userspace expoloit… e.g. in the irc client
dTal 2017-01-31 10:13:48
or carelessness - like a "test" account
Iridos 2017-01-31 10:13:48
that gives them free access to all the other systems I am connected to via keys
smile123 2017-01-31 10:14:27
hello
n4dir 2017-01-31 10:14:29
assuming they somehow also get the password
smile123 2017-01-31 10:14:29
i install opera and i have problem,
smile123 2017-01-31 10:14:31
every time open opera want keyring login
smile123 2017-01-31 10:14:35
i uninstall opera but continue to want keyring and with chromium browser
smile123 2017-01-31 10:14:37
how can i fix this problem?
Iridos 2017-01-31 10:15:06
which password
n4dir 2017-01-31 10:15:11
for the ssh-key
greycat 2017-01-31 10:15:30
I'm guessing he means "When I login to Debian I am prompted for the passphrase for my ssh private key"
greycat 2017-01-31 10:16:03
But that might be a bad guess. His English is confusing to me.
Iridos 2017-01-31 10:16:49
n4dir, no… a) access is granted to all shells via the agent anyway (so just ssh in, leave more backdoors) … b) the passphrase is stored inside the agent somewhere and can be retrieved with gdb or the likes
n4dir 2017-01-31 10:17:40
ok
n4dir 2017-01-31 10:17:56
let's pray no one will find a exploit then.
n4dir 2017-01-31 10:18:26
iow: i didn't think about that
Iridos 2017-01-31 10:19:04
Chrome/chromium in some configurations uses the gnome (kde, etc.?) keyring to encrypt the password store… I think he might refer to that… but… that's how it should be, so not sure what the problem is
greycat 2017-01-31 10:19:34
You run eval "$(ssh-agent -s)" or similar in your main login dot file and this causes that shell to export the env vars that ssh uses to talk to the agent. Then your WM and your terminals and your shells all inherit those vars.
Iridos 2017-01-31 10:20:33
greycat, I use "keychain" in my .profile, because that way the shell I get when I ssh into that machine gets access to the agent, too
greycat 2017-01-31 10:21:02
I don't know what "keychain" is.
Iridos 2017-01-31 10:21:06
which is what I want, as only the work machine has the keys for the work system
Iridos 2017-01-31 10:21:24
well… apt-cache show keychain might remedy that :>
nkuttler 2017-01-31 10:21:31
!keychain
dpkg 2017-01-31 10:21:31
Keychain is an application to have SSH and/or GPG agents be run for you at a login shell. apt-cache show keychain
greycat 2017-01-31 10:21:52
How does it differ from running a standard ssh-agent?
n4dir 2017-01-31 10:22:08
i seem to recall keychain makes sure that you can make use of ssh-keys also on the hosts you did ssh to, but i would not bet on that (as i never used it)
greycat 2017-01-31 10:22:10
Does it do some sort of heuristic search for an already-running agent?
nkuttler 2017-01-31 10:23:36
greycat: right
Toordog- 2017-01-31 10:33:54
WHat would you use to have an overview of your park of servers (2000+ servers) to display stuff like: Hardware(CPU info, RAM, HDD, VG, LV), Network (IP, Hostname), and be able to run report to return all servers with +4 CPU or all server with 4G+ RAM and so on ?
Toordog- 2017-01-31 10:34:27
mostly looking for an operational server inventory to query
somiaj 2017-01-31 10:38:03
Toordog-: there are various choices, unsure exactly which ones are in debian as I don't use them, but Zabbix and Nagios both spring to mind
somiaj 2017-01-31 10:38:06
,v zabbix
judd 2017-01-31 10:38:07
No package named 'zabbix' was found in amd64.
somiaj 2017-01-31 10:38:21
,v zabbix-agent
judd 2017-01-31 10:38:21
Package: zabbix-agent on amd64 -- wheezy-backports: 1:2.2.5+dfsg-1~bpo70+1; jessie: 1:2.2.7+dfsg-2+deb8u1; jessie-backports: 1:3.0.7+dfsg-1~bpo8+1; stretch: 1:3.0.7+dfsg-1; sid: 1:3.0.7+dfsg-1
Toordog- 2017-01-31 10:38:33
Nagios will do monitoring but not allow to query data related to the environment of hte server
somiaj 2017-01-31 10:38:44
Toordog-: http://serverfault.com/questions/44/what-tool-do-you-use-to-monitor-your-servers is a list of some suggestions
Iridos 2017-01-31 10:38:49
we use ganglia for 500ish servers of all the same type (in most regards)… I think that wouldn't scale so easily another factor of 4 (with the many metrics we look at, at least) … and … still looking for something else
somiaj 2017-01-31 10:38:53
Toordog-: even with plugins? zabbix is one I nkow my friend uses, but I don't know the details.
Toordog- 2017-01-31 10:39:15
we are using opsview for now and going to implement icinga2
Toordog- 2017-01-31 10:39:25
we are also using puppet and going to use puppetdb
Iridos 2017-01-31 10:39:31
I mean it would scale up to record all the data… but sifting through it for problems wouldn't scale easily
somiaj 2017-01-31 10:39:47
puppet monintors? I thought it was more a configuration tool? But yea it may have plugins too.
Iridos 2017-01-31 10:40:12
Toordog-, maybe take a look at sensu? that's on my list to have a look at… it'd do both the nagios and the metric-recording stuff
Toordog- 2017-01-31 10:40:37
but not sure if any of these tools can respond to a question like : is that server been upgraded temporary compare to its baseline and never revert back, or how many servers i have with more than 4 CPU and 4G RAM, or for that client, how many server with the hostname matching this pattern.
Toordog- 2017-01-31 10:41:16
I studied Sensu 3 years ago, surely it has improved, back then, it required too much frontend coding to implement
Toordog- 2017-01-31 10:41:40
maybe Icinga2 with Graphite and a database to store some inventory metrics
Toordog- 2017-01-31 10:41:49
polled by puppet
Toordog- 2017-01-31 10:42:22
similar tools that would do thing i
Toordog- 2017-01-31 10:42:30
*just Katello does half of it :P
Iridos 2017-01-31 10:42:46
I don't like the active polling model of nagios/icinga… that may be great for switches and other dumb things, but for computes I feel it's a lot smarter if they push data up whenever they want to
Iridos 2017-01-31 10:43:00
and if they stop pushing data, then they're probably dead
Toordog- 2017-01-31 10:43:27
Iridos it is a philosophy that works, is has its drawback as well
Toordog- 2017-01-31 10:43:43
/is/it/
Iridos 2017-01-31 10:44:20
like?
Iridos 2017-01-31 10:44:48
seems much more useful to me, as the clients have all the data anyway… querying from outside can be quite a pain