Force SSH client to use password authentication instead of public key
To test if you can connect to a host using password authentication and explicitly deny public key authentication:
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host
This also works for Secure Copy:
scp -o PreferredAuthentications=password -o PubkeyAuthentication=no local.file user@host:/path/to/remote.file
Related cards:
Workflow: How to use a key management service to encrypt passwords in the database
This is an extract from the linked article. It shows an approach on how to implement encrypted passwords with the AWS Key Management Service (KMS).
For most applications it's enough to use a hashed...
How to use Git on Windows with PuTTY
- Get "PuTTY Link" and "Pageant" (an SSH key agent) from the PuTTY download page.
- Run
pageant.exe
, find its icon inside your system tray and add your SSH key. - Open up a `c...
How to fix "Too many authentic authentication failures" with SSH and/or Capistrano
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH):
Too many authentication failures for username
This is caused by having too many SSH keys added to your keyring or ssh-agent. Your ssh-agent will throw all...
Find out your SSH key's fingerprint (e.g. to authenticate on GitHub)
If you want to know your public key's fingerprint, do this:
ssh-keygen -lf ~/.ssh/my.key.pub
This may be necessary to authenticate your key on GitHub because of [recent events](https://github.com/blog/1068-public-key-security-vulnerability-a...
Make Capistrano use SSH Key Forwarding
When deploying code with Capistrano (depending on your configuration) at some point Capistrano tries to check out code from your repository. In order to do so, Capistrano connects to your repository server from the application server you're deploy...
Allow capybara to click on labels instead of inputs for checkboxes
Within Capybara you most certainly use the #check
- and #uncheck
-method to (un)check checkboxes.
But there's one problem, if you want to test a custom styled checkbox, which hides its <input>
-Tag:
- *The methods cannot (un)check checkboxes w...
Working on the Linux command line: Use the `tree` command instead of repeated `cd` and `ls`
The tree
command will show you the contents of a directory and all its sub directories as a tree:
>tree
.
├── a
│ ├── file_1.txt
│ └── file_2.txt
└── b
├── c
│ └── even_more.txt
└── more.txt
3 directories, 4 files
If...
Bundler: How to install version 1 instead of 2 (latest version)
When installing a gem you can use version comparators like >=
or ~>
. That way it is possible to fetch the latest version of Bundler 1 with this command:
gem install bundler -v '~>1'
[How to install bundler for Ruby < 2.3](/makandra/...
How to force a client-side refresh on a new favicon
Browsers usually cache favicons. If you update the favicon of your web site and want all visitors to see the new icon, you need to give the icon a different URL. You will not have this issue if you [cache your assets properly](https://makandracard...
Use the "paper_trail" gem to track versions of records
paper_trail
is an excellent gem to track record versions and changes.
You almost never want to reimplement something like it yourself. If you need to log some extra information, you can add them on top.
It comes with a really good README file...