Log into server with ssh, update svn one-liner
Alec Jacobson
September 01, 2011
We use svn to manage the IGL website. This has its ups and downs. Unfortunately the permissions on the ETH servers are set up so that only a single account can be used to update the server version. Thus every time we make local edits we need to log into the server as this account and issue svn update. Luckily ssh lets you roll a single command into the ssh command. Thus this whole procedure can be condensed into a one-liner:
ssh username@server.com "svn update path/to/version/controlled/dir/"
I save this in my bash .profile with an alias:
alias svnupdateusername="ssh username@server.com \"svn update path/to/version/controlled/dir/\""
Then I can just locally issue:
svnupdateusername
The only problem I have with this is that when svn prompts me for the username's password it no longer hides my input, which is annoying because in the version of universe in which I care about security I have to clear my terminal and look over my shoulder.