Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 6005  / 2 Years ago, thu, february 3, 2022, 10:26:54

I have to log in to my school's Linux server for homework. I would like to be able to make a script or something for my desktop to save a bit of time (using Ubuntu desktop).



Currently I log in using the following:
SSH [email protected]



Would there be a way to automation this task so I can click an icon? Actually while typing this...just thinking, would bashrc be a better way than a script?


More From » bash

 Answers
1

You could also setup a password-less SSH login with this question here. And then alias a command and put it in the .bash_aliases file. Something like:



alias school_connect='ssh [email protected]'



and additionally even create a desktop launcher with something like this:




  1. Right-click on the desktop and click create launcher.

  2. Enter a name, like SSH_School_Terminal

  3. In the command field, enter, gnome-terminal -x bash -c "school_connect;bash". Note that command is the alias you created.

  4. Click Ok



Double-clicking the launcher will launch a terminal and connect via SSH to your school.



enter image description here


[#43452] Friday, February 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aveerakfas

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
1 Year ago
;