0

I want to create a desktop shortcut that automatically logs into a testserver via ssh, and shows the active terminal.

Script:

#!/usr/bin/env bash
sshpass -p "mypass" ssh myusr@192.168.xxx.xxx

Link:

[Desktop Entry]
Version=1.0
Name=Connect SSH
Type=Application
Exec=/home/<user>/Documents/testserver.sh
Name[en_US]=Testserver

Question: it seems to work in general, but I don't see any terminal opening. How can I show the terminal that opened the ssh connection?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
membersound
  • 1,410
  • I think you can just use !/usr/bin/bash. You should setup sshkeys instead of putting your password in a file. Did you try to put a bash before the line? How do you know it seems to work in general? – derHugo Aug 01 '17 at 15:14
  • I'm glad you solved your issue. However, please don’t put the answer in your question! Normally I would ask you to write an answer instead but this question is closed as a duplicate and for good reason: the solution is the same as to the linked question. I took the liberty to revert the edit that adds the solution to the question. – David Foerster Aug 02 '17 at 09:34
  • Well, if anybody finds that question in future, he would have to follow the linked question, and read the entire content there. If I would come back to my own question, I'd prefer having the solution right here, even if a link to a duplicate question is available. But that's probably a matter of taste. – membersound Aug 02 '17 at 10:34

0 Answers0