GNU/Linux Inside

Tag Archives: bash

ssh-copy-id and sshd port 1

For security purposes, I don’t run sshd on the default port (22). This gave me some problems when attempting to use the command ssh-copy-id. Ideally, you’d expect the following to work:

?View Code BASH1
ssh-copy-id -p XXXX -i ~/.ssh/id_rsa.pub username@host

However, that didn’t do anything but output an error:
Bad port ‘umask 077; test -d .ssh || mkdir .ssh [...]

compgen -d: No such file or directory 3

For a while, I was having a problem on my Ubuntu server. After creating a user, I noticed that tab completion didn’t work properly. In fact, it went so far as to output an error:

Clearing BASH Command History 0

BASH (bourne again shell), the default shell used on many GNU/Linux distributions, keeps a history of all commands entered. This can be a great convenience. However, scrolling back, I saw a number of commands I would prefer gone in case somebody decided to snoop around my system. Especially the commands where I accidently entered the [...]