Categories
linux

ssh notes

Error similar to…

Unable to negotiate with x.x.x.x port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1

Two things:

1) Add the following argument to the ssh command:

-oKexAlgorithms=+diffie-hellman-group-exchange-sha1

2) Add option to your ~/.ssh/config:

Host x.x.x.x
    KexAlgorithms=+diffie-hellman-group-exchange-sha1

Other options that might be relevant include HostkeyAlgorithms and Ciphers

Categories
linux

random snippets

Moving the 5 oldest items from current folder to DIR2:

ls -Qrt | head -5 | xargs -i mv -v ./{} DIR2/

Setting screen resolution on MacOS (VMware) with VMware Tools installed:

sudo /Library/Application\ Support/VMware\ Tools/vmware-resolutionSet WIDTH HEIGHT

View IPMI information from ESXi Shell:

localcli hardware ipmi bmc get

Using exiftool, rename images with date/time filenames based on when they were taken/created:

exiftool -d '%Y-%m-%d %H.%M.%S%%-c.%%e' '-filename<CreateDate' .

Additionally, to update the creation timestamp of the file based on when the photo was taken/created:

exiftool "-filecreatedate<datetimeoriginal" .