Useful commands and sample configuration files.
ssh-keygen -t 'rsa' -b 2048
Append '~/.ssh/id_rsa.pub' to remote host '~/.ssh/authorized_keys'
In the case that you need to reboot a machine remotely, login through ssh and use the following command:
sudo shutdown -r now
Useful for checking eternal hard drive (in Mac OS X)
sudo vsdbutil -c /Volumes/MyDrive
sudo vsdbutil -a /Volumes/MyDrive
#!/bin/sh for x do echo "$x" tar -cf "$x.tar" "$x" gzip "$x.tar" done
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi
# .bashrc # User specific aliases and functions # set prompt, format = 'user@host[pwd]$ ', for example: 'chkuo@bobcat[~]$ ' PS1='\[\e[1;34m\]\u\[\e[0m\]\[\e[1;33m\]@\[\e[0m\]\[\e[1;31m\]\h\[\e[0m\][\w]\[\e[1;32m\]\$\[\e[0m\] ' # User specific environment and startup programs export PATH="${PATH}:/usr/local/bin:~/bin:~/script" # shell command alias alias .='pwd' alias ..='cd ..' alias cd..='cd ..' alias l='ls -lFG' alias lm='ls -lFG | more' alias ll='ls -alFG | more' # short cut to active project directory alias pls='cd ~/plscript/' alias sc='cd /scratch/$USER/' # ssh alias for connecting to other machines # University of Arizona # HPC ICE (cluster) export ICE='ice.hpc.arizona.edu' alias ice='ssh $ICE' # HPC Marin (shared memory) export MARIN='marin.hpc.arizona.edu' alias marin='ssh $MARIN' # Yale University # Ochman/Moran lab server export APHID='aphidhouse.west.yale.edu' alias aphid='ssh $APHID'