After an update for Mac OSX sierra ssh would not allow access to dsa.
To fix this added the below to .ssh/config which fixed the problem.
Host *
HostkeyAlgorithms +ssh-dss
PubkeyAcceptedKeyTypes +ssh-dss
After an update for Mac OSX sierra ssh would not allow access to dsa.
To fix this added the below to .ssh/config which fixed the problem.
Host *
HostkeyAlgorithms +ssh-dss
PubkeyAcceptedKeyTypes +ssh-dss
To autocomplete ssh hostnames from knownhosts,
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh
Source link
http://hints.macworld.com/article.php?story=20080317085050719
To run a command after ssh to a server.
Run the below.
ssh root@server.com 'df -h'