Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-13-2003, 10:12 AM   #1
Registered: Dec 2002
Posts: 129

Rep: Reputation: 15

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'

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, 10:23 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976

please do not ask a question more than once. this is clearly stated in the rules of this site.
Old 03-13-2003, 10:32 AM   #3
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, 05:14 PM   #4
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.


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 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 01:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 01:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 04:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 06:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 10:10 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:09 AM.

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