12-27-2009
SSH and alias question...
i regularly login to servers that I donot control. On many of these servers I do not have home dir. I need to set aliases from my host to the remote machine when I ssh in.
for example from when I go from hosta --> hostb. I want all my aliases from hosta to be present in hostb once I login. ( i use SSH to login)
is it possible?
Thanks in advance
Vijay
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Having a memory lapse:
If I redefine a command using an alias or a function - How do I access the "real" command without specifying an absoulte path:
i.e.
function man
{
/usr/bin/man |more
}
alias ls='/usr/bin/ls -l'
How do I specify the ls or man command above without the... (6 Replies)
Discussion started by: kornshellmaven
6 Replies
2. Shell Programming and Scripting
I have a program to scan the log files and I want to pipe the output to 'less'.
I want to create an alias such that following are equivalent
scanlog chunky.lst = /udd/n2man/utils/scanlog chunky.lst|less
where chunky is user supplied file which can change.
Is this possible as an alias or... (1 Reply)
Discussion started by: ospreyeagle
1 Replies
3. UNIX for Dummies Questions & Answers
Some Unix systems won't enable you to do the following. What danger do you see lurking in this alias?
(a) alias who (b)who -a
Do you know it? Thanks! (1 Reply)
Discussion started by: jayyu317
1 Replies
4. UNIX for Dummies Questions & Answers
Sorry if this should be in the shell scripting area, it seemed too foolish to be answered there
--------------------------------
In my .bash_profile i added:
alias "sudo su"='bash hard link with bash script at end'
It didn't work was a result, what is the quotation problem?
------
... (2 Replies)
Discussion started by: cleansing_flame
2 Replies
5. UNIX for Advanced & Expert Users
Hello,
I have created following alias in csh
lab 'rlogin -l user23 complab23'
but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies
6. Shell Programming and Scripting
I am using following alias in csh to find process.
alias pp 'ps -ef | grep \!*'
>pp java
root 27742 27558 0 15:55 pts/12 00:00:00 grep java
but It does not work in bash.
alias pp='ps -ef | grep \!*'
#pp java
grep: java: no such file or directory
How can I use this feature... (1 Reply)
Discussion started by: hcliff
1 Replies
7. UNIX for Dummies Questions & Answers
hi all,
I setup a new server using centos 5.0 with webmin installed and its working fine. the only problem i found is that I now cant ssh into the box anymore for some reason. I am able to ssh out of it no problem tho. I did check to see if ssh was running and it was. I did the following to... (12 Replies)
Discussion started by: mcraul
12 Replies
8. UNIX for Dummies Questions & Answers
how would i turn alias off all together? (1 Reply)
Discussion started by: JamieMurry
1 Replies
9. Solaris
OS = Solaris 8
Issue: alias not working for root, but working for regular users
# grep root /etc/passwd
root:x:0:1:Super-User:/:/sbin/sh
# alias dir=ls
# dir
dir: not found
# alias dir="ls -l"
# dir
dir: not found
# alias dir='ls -l'
# dir
dir: not found
# alias... (2 Replies)
Discussion started by: aixlover
2 Replies
10. UNIX for Dummies Questions & Answers
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies
LEARN ABOUT FREEBSD
mailaddr
MAILADDR(7) BSD Miscellaneous Information Manual MAILADDR(7)
NAME
mailaddr -- mail addressing description
DESCRIPTION
Mail addresses are based on the Internet protocol listed at the end of this manual page. These addresses are in the general format
user@domain
where a domain is a hierarchical dot separated list of subdomains. For example, a valid address is:
eric@CS.Berkeley.EDU
Unlike some other forms of addressing, domains do not imply any routing. Thus, although this address is specified as an Internet address, it
might travel by an alternate route if that were more convenient or efficient. For example, at Berkeley, the associated message would proba-
bly go directly to CS over the Ethernet rather than going via the Berkeley Internet gateway.
Abbreviation.
Under certain circumstances it may not be necessary to type the entire domain name. In general, anything following the first dot may be
omitted if it is the same as the domain from which you are sending the message. For example, a user on ``calder.berkeley.edu'' could send to
``eric@CS'' without adding the ``berkeley.edu'' since it is the same on both sending and receiving hosts.
Compatibility.
Certain old address formats are converted to the new format to provide compatibility with the previous mail system. In particular,
user@host
and
user@host.domain
are allowed;
host.domain!user
is converted to
user@host.domain
and
host!user
is converted to
user@host.UUCP
This is normally converted back to the ``host!user'' form before being sent on for compatibility with older UUCP hosts.
Case Distinctions.
Domain names (i.e., anything after the ``@'' sign) may be given in any mixture of upper and lower case with the exception of UUCP hostnames.
Most hosts accept any combination of case in user names, with the notable exception of MULTICS sites.
Route-addrs.
Under some circumstances it may be necessary to route a message through several hosts to get it to the final destination. Normally this
routing is done automatically, but sometimes it is desirable to route the message manually. Addresses which show these relays are termed
``route-addrs.'' These use the syntax:
<@hosta,@hostb:user@hostc>
This specifies that the message should be sent to hosta, from there to hostb, and finally to hostc. This path is forced even if there is a
more efficient path to hostc.
Route-addrs occur frequently on return addresses, since these are generally augmented by the software at each host. It is generally possible
to ignore all but the ``user@hostc'' part of the address to determine the actual sender.
[Note: the route-addr syntax is officially deprecated in RFC 1123 and should not be used.]
Many sites also support the ``percent hack'' for simplistic routing:
user%hostc%hostb@hosta
is routed as indicated in the previous example.
Postmaster.
Every site is required to have a user or user alias designated ``postmaster'' to which problems with the mail system may be addressed.
Other Networks.
Some other networks can be reached by giving the name of the network as the last component of the domain. This is not a standard feature and
may not be supported at all sites. For example, messages to CSNET or BITNET sites can often be sent to ``user@host.CSNET'' or
``user@host.BITNET'' respectively.
SEE ALSO
mail(1), sendmail(8)
Crocker, D. H., Standard for the Format of Arpa Internet Text Messages, RFC822.
HISTORY
Mailaddr appeared in 4.2BSD.
BUGS
The RFC822 group syntax (``group:user1,user2,user3;'') is not supported except in the special case of ``group:;'' because of a conflict with
old berknet-style addresses.
Route-Address syntax is grotty.
UUCP- and Internet-style addresses do not coexist politely.
BSD
June 16, 1993 BSD