Skip to main content

Posts

Showing posts with the label linux

Emacs append PATH

We sometimes need to add node, yarn and some other binaries to the PATH. Of course, it is possible to do it with the PATH environment variable. But to have it just inside Emacs: (add-to-list 'exec-path "/home/mihamina/.config/yarn/global/node_modules/.bin")

Jenkins invalid privatekey

Publish over SSH, Message "invalid privatekey:" With quite recent (June-July 2020) installations of Jenkins and OpenSSH, I have the following error message when using the "Deploy overs SSH" Jenkins plug-in and publishing artifacts to the target overs SSH: jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: [B@d8d395a] This problem seems to be referenced here: https://issues.jenkins-ci.org/browse/JENKINS-57495 Just regenerate a key with the right parameters To solve it: ssh-keygen -t rsa -b 4096 Or ssh-keygen -t rsa -b 4096 -m PEM

sudo redirect to a file

When wanting to append some string to a file using sudo [mihamina@dell-f17 ~]$ pdsh  'echo "sshd:LOCAL,41.190.237.66,41.188.46.121" | sudo tee  /etc/hosts.allow' hosting: sshd:LOCAL,41.190.237.66,41.188.46.121 filer: sshd:LOCAL,41.190.237.66,41.188.46.121 recette53: sshd:LOCAL,41.190.237.66,41.188.46.121 prod53: sshd:LOCAL,41.190.237.66,41.188.46.121 recette52: sshd:LOCAL,41.190.237.66,41.188.46.121 prod52: sshd:LOCAL,41.190.237.66,41.188.46.121 And it gives: [mihamina@dell-f17 ~]$ pdsh  'sudo grep sshd /etc/hosts.allow' recette53: sshd:LOCAL,41.190.237.66,41.188.46.121 prod53: sshd:LOCAL,41.190.237.66,41.188.46.121 filer: sshd:LOCAL,41.190.237.66,41.188.46.121 hosting: sshd:LOCAL,41.190.237.66,41.188.46.121 recette52: sshd:LOCAL,41.190.237.66,41.188.46.121 prod52: sshd:LOCAL,41.190.237.66,41.188.46.121