Upload file via ssh connection
One common thing you have to do when doing Sysops, is uploading or downloading files. Most times you've got a SFTP connection to do so, but often times that's not possible and you only have a SSH connection available. Every time I have to do this, I again search how to do it : ) Time to put it in a short instruction:
scp /path/to/local-file ssh-username@your-host:/path/to/destination
So for example:
scp project/.htaccess liplex@edisonn:/var/www/html/project/.htaccess
The your-host
part is whatever name you put into your ~/.ssh/config
file. In my example it would be:
Host edisonn
HostName edisonn.de
User liplex