LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2003, 09:12 AM   #1
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Rep: Reputation: 15
scripts


i am connecting to one of my servers with ssh. I have to connect to it using the ip address. i used the following command at the command prompt to set up an alias for my server to connect to:

alias samba='ssh xxx.xxx.xxx.xxx'

after i type this i can then go to the command prompt and type samba and i will connect to my server through ssh.

the problem i am having is when i log off or reboot the alias is lost. i attempted to write a script to make sure each time i booted i could use the alias but i am a very new beginner at writing scripts

if somebody could show me how to write a script that would allow the alias to be used each time i boot into the machine i would appreciate it. thank you.
 
Old 03-13-2003, 09:23 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://www.linuxquestions.org/questi...threadid=49589

please do not ask a question more than once. this is clearly stated in the rules of this site.
 
Old 03-13-2003, 09:32 AM   #3
jmarsh
Member
 
Registered: Dec 2002
Posts: 129

Original Poster
Rep: Reputation: 15
did not realize that my friend, after i wrote it i figured it probably would be better off over here but wasnt sure how to delete it from the network forum.
 
Old 03-13-2003, 04:14 PM   #4
chrisk5527
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Rep: Reputation: 30
Depending on what shell you are using you need to enter that into a file, such as .zlogin or .cshrc or whatever so that when you login it, it reads that file and creates aliases dynamically.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 03:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:24 PM.

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
Open Source Consulting | Domain Registration