LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-28-2008, 03:57 PM   #1
eyeprotocol
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Rep: Reputation: 0
Shortcut / Launcher for Auto SSH Console Window


Hello all

I run Gnome, and wish to create a shortcut/launcher on my desktop that (once double-clicked) will open a console window and auto run ssh (with proper parameters) so that it will attempt to login to a remote server.
Is this possible?

Please assist.
 
Old 07-28-2008, 04:09 PM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Sure, here's a script I use for just such an occasion:
Code:
#!/bin/bash

# Clear the screen
clear

# Launch an XFCE4 Terminal with all the linux servers in tabs
# this is a work in progress...

# Define Servers
echo "Defining servers for $HOSTNAME.mydomain.edu"
echo
www="www.mydomain.edu"
other="other.mydomain.edu"

# Short or preferred names

www1="Web_Server"
other1="Other_Server"


# Launch the Terminal

echo "Launching the terminals now"
echo

source ~/.bash_profile
Terminal --title $www1 --command "ssh -l username $www" \
--tab --title $other1 --command "ssh -l username $other"

echo "All set"
echo
Could certainly use a little "cleaning" but it seems to work for my needs.

{edit}
Forgot to mention keys. You could also setup keys to exchange to bypass a required password and just the SSH keyphrase instead. It feels a little more secure than just sending my password to each server.
{edit}

-Chad

Last edited by MasterC; 07-28-2008 at 04:11 PM. Reason: SSH Keys
 
Old 07-28-2008, 04:19 PM   #3
eyeprotocol
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you Chad.

My keys are all setup properly, thank you.

However, the script is not working. It has an empty "echo" line and it has a line starting with "Terminal". My machine reports that this command does not exist. Am i missing something?

 
Old 07-28-2008, 04:26 PM   #4
eyeprotocol
LQ Newbie
 
Registered: Jul 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Ahhh.. forget it. It needs the command "gnome-terminal" instead.

Sincere thanks.

 
  


Reply

Tags
auto, console, gnome, login, shortcut, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure launcher to maximize window taylorkh Linux - Software 2 05-08-2008 01:48 PM
gDesklets Help (Window Launcher) carlosinfl Linux - Software 2 08-20-2006 07:08 PM
Window Maker: making a launcher hamish Linux - Software 1 03-24-2005 06:57 AM
shortcut/launcher problem after updating linuxbuck2000 Fedora 1 11-20-2004 02:39 AM
gnome launcher/opera shortcut? BajaNick Linux - Software 0 08-17-2003 11:47 PM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration