English | 日本語
This is a macro for the remote log-on client TeraTerm that allows you to connect to a target server via SSH and execute commands. For more information about TeraTerm, please visit the following sites:
- Download the repository
git clone https://github.com/takagiyuuki/teraterm-templates.git
- Register server information
Edit conf/conf.ttl
to register the server information:
hostnamestr = '' ; server's hostname
ipaddressstr = '' ; server's IP address
portstr = '' ; server's SSH port number (default: 22)
userstr = '' ; server's SSH login user
pswdstr = '' ; server's SSH login password
sshkeystr = '' ; server's SSH private key file (default: keys\id_rsa)
- Specify the commands to be executed in
cmd/cmd.txt
By default, the following commands are listed. Remove or add commands as needed:
date
hostname
whoami
echo "hallo. World"
- Choose the login method (Password authentication / Public key authentication)
- For password authentication, edit
main.ttl
and uncommentsshlogin = 'cmd\login-pswd.ttl'
- For public key authentication, uncomment
sshlogin = 'cmd\login-keys.ttl'
and save the private key in thekeys\
directory
; Login
; sshlogin = 'cmd\login-pswd.ttl' ; password authentication
; sshlogin = 'cmd\login-keys.ttl' ; public key authentication
- Execute
main.ttl
In the command prompt, execute the following command or double-click on main.ttl
:
cd ~\teraterm-template
.\main.ttl