sshhost is an bash script for relay ssh connection over an specific host. This host do the connection via ssh with keys and have for each host an own key. So if you have 100 people and everyone will connect to 100 different hosts, you don't need to create 100*100 keys. Set up the following and you need only one sshhost.
- be sure, the file /etc/ssh/sshd_config contains "SyslogFacility AUTH" and "LogLevel INFO"
- ssh-keygen -t rsa -N "" -f /home/myusername/.ssh/id_rsa_sshhost
- ssh-copy-id -i /home/myusername/.ssh/id_rsa_sshhost.pub user@sshhost
- ssh -i /home/myusername/.ssh/id_rsa_sshhost user@sshhost
4. create some aliases in your own file .bash_aliases or /etc/bash/bashrc or wathever you bash loaded
- sshh='ssh -t -t -i ~/.ssh/id_rsa_sshhost user@sshhost "bash /home/user/.ssh/_batch/dossh.sh"'
- sshhost='ssh -i ~/.ssh/id_rsa_sshhost user@sshhost'
- sshhostlog='ssh -i ~/.ssh/id_rsa_sshhost root@sshhost tail -f -n 100 /home/user/.ssh/log/sshconnect.log'
- sshhostopenconn='ssh -t -t -i ~/.ssh/config/id_rsa_sshhost root@sshhost bash /home/user/.ssh/_batch/watch_dir.sh'
- sshh root@host1
at first connection it will ask you for key creation...
- sshhostlog
- sshhostopenconn
Feel free to inform me, when you find any mistakes or want changes... sloking@gmx.net
If you want to use outputs and logs in german, rename file dossh_ger.sh to dossh.sh