3

I'm looking for a way to login to Linux server automatically using TeraTerm. For example, i have an user called tester in CentOS7. I created ssh key with ssh-keygen command for tester in his /home/tester/.ssh/ folder. So we have 2 key file here, id_rsa and id_rsa.public

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

1 Answer 1

0

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

`

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.