Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Login to Linux server automatically using SSH key with TeraTerm

I downloaded id_rsa to my laptop and saved it as tester.pem and used it to login to linux server successfully using Tera Term. Now i want to make it automatically which means i can just use 1 click to .ttl file and voila, login successful. Here's the script of tester.ttl but it didn't work.
username = 'tester'
keyfile = '"C:\path\to\keyfile\tester.pem"'
hostname = 'server's ip'

pass = '789789'
msg = hostname
strconcat msg ':22 /ssh2 /auth=publickey /user='
strconcat msg username
strconcat msg ' /keyfile='
strconcat msg keyfile

connect msg
by

1 Answer

Kajalsi45d
I was not able to duplicate your issue. A login.ttl file with the following contents allowed me to successfully login to the desired ssh server (after placing the public key in the authorized_hosts file on the host).
username = 'tester'
hostname = '192.168.100.1'
keyfile = 'c:\path\to\keyfile\id_rsa'

con = hostname
strconcat con ':22 /ssh2 /auth=publickey /user='
strconcat con username
strconcat con ' /keyfile='
strconcat con keyfile
connect con

Login / Signup to Answer the Question.