Author Archives: fitzi

About fitzi

I'm a network operator by day and by night I spend my time working through service provider certification tracks as well as teaching myself python. I am looking to get more involved in the automation of repetitive tasks.

single PR single commit

When you are using git in a forking workflow, your local commits and pushes will end up on your fork of the repository you are contributing to.

In general a PR should contain single commit (at least the project that I have worked on) so before you send your PR you will generally want all your commits (changes) in one single commit. In this case there are two options, one is to “squash” all your commits into a single commit or the alternative is to continuously amend each commit to your first one.

This can be accomplished by first adding the changes you want to amend:

git add < filename>

After which you can simply use the below command to amend these changes to you previous commit without updating the original commit message.

git commit --amend --no-edit

NOTE: Once you amend to a previous commit your subsequent pushes will fail. This is because your local branch is out of sync with the remote branch. To fix this you will be need to add the force flag, be aware that this will overwrite the remote branch with the local changes.

git push --force

Further detailed info can be found here: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

Facebooktwitterlinkedinby feather

ssh options for ancient IOS version

Connecting to devices running ancient Cisco IOS versions can be a pain as newer ssh clients are not by default supporting weak ciphers and older key exchange algorithms as these old devices only support insecure ciphers.

I had an alias in my profile for this long ago but after upgrading my OS I ran into the issue again, in this case it was the following version of IOS:

Cisco IOS Software, C3750 Software (C3750-IPSERVICESK9-M), Version 12.2(55)SE6, RELEASE SOFTWARE (fc1)

c3750-ipservicesk9-mz.122-55.SE6.bin

I found my previous workaround but this was no longer working, the fix was to also specify the cipher, adding the below as an alias in my .bashrc profile:

alias ssho='ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -caes256-cbc'
Facebooktwitterlinkedinby feather