[root@rhce-ryanrudolf]# rm -rf / 2> /dev/null

things I break/fix for fun and learning

Nov 28, 2017 - 1 minute read - Comments

ssh and scp - my most used commands

ssh & scp are my most used commands once I started playing around with my homeserver.

ssh I use it to login remotely to the server, issuing a command like this -

ssh username@SERVERIP -p PORTNUM

For security measures, I have disabled root logins and changed the default port 22 to something else. Those settings are configurable under this file -


and look for the PermitRootLogin and Port entries respectively.

scp I use it to transfer files from my local machine to the home server. Usually this are screenshots that will be displayed on the homeserver. For this, I issue a command like this -

scp -P PORTNUM localfile username@SERVERIP:~/path/to/save/the/file

scp uses the same port as ssh. instead of using another service like FTP for transferring files, I just use scp. Less services to manage and scp does the job too.

Like this page? Share it!

Hugo Cheatsheet Linux CLI and vi cheatsheet

comments powered by Disqus