Kev's Site
  • Home
  • Games
  • Categories
  • Tags
  • About

Console access into a running Docker container

August 5, 2014

Sometimes, when setting up and debugging a container it is extremely useful to be able to ‘shell into’ the container to get a closer look at what’s going on. This is a quick guide on how to get shell console access into a running Docker container. UPDATE. If you are running docker version 1.3 or greater then you should use docker exec instead (see docker man pages for more info). The only use case that still requires the use of nsenter is where the user assigned to the container prevents you from doing tasks inside.
Read More

How to stop ssh from adding a server to known_hosts file

January 3, 2014

If you do a fair amount of tinkering on cloud servers, such as EC2 or Digital Ocean, then you’ll have noticed that each time you start a server it gets a new IP address allocated. Then when you next log on to the server via ssh the server gets added to your known_hosts file.

Before long your known_host file has dozens, if not hundreds of entries for servers that you’ve long shut down and discarded.

At first I would edit the known host file and remove the server entry once I’d done with the server, but this got tiresome after a while.  So, I decided that for the servers I’m just messing about on I’d rather not add the server into the known_hosts file at all.

Read More

Add a GIT remote as https instead of ssh

November 24, 2013

Using Bitbucket from a network that does not allow ssh (port 22) connections means that doing a git push or pull using the standard git ssh remote won’t work. git remote add origin https://[email protected]/USERNAME/REPOSITORY.git Where USERNAME is your user/login name and REPOSITORY is the name of the repository you want to access. If you don’t want to enter your password every time you connect to the remote you can include the password in the remote url: git remote add origin https://USERNAME:PASSWORD@bitbucket.
Read More

Add a Linux swap file

October 13, 2013

How to add a swap file (not partition) to linux
Read More

How to speed up a slow SSH login

October 10, 2013

I recently started using the excellent digital ocean for some of my cloud server hosting. When logging into my servers there was quite a delay, often a minute or more, before the password prompt appeared. I was getting the same delay when I use SSH keys for authentication too.

Read More

 © 2009 - 2025 Kevin Ellis