LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2003, 07:43 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:39 AM   #2
Smerk
Member
 
Registered: Oct 2002
Location: Cairnsian, Oz
Distribution: Debian testing/unstable, knoppix/debian fudged router!
Posts: 169

Rep: Reputation: 30
you could possibly edit your /etc/rc.d/rc.local file and add
alias samba='ssh xxx.xxx.xxx.xxx'

as a thought, you could maybe add
xxx.xxx.xxx.xxx myserver
to the hosts file ( /etc/hosts) and get name resolution that way...

mind you, I could be talking out my bottom for all I know with this stuff...
 
  


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 - Networking

All times are GMT -5. The time now is 12:11 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