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

Hi,

add a file for eg .aliases, and define all your aliases in this file, then call this file from your .bash_profile(of the user, you r logging in with).

cheers

No for this to work I will have to have the .bash_profile on the remote servers...Which I can't have.... I need to send the alias from the host to the remote client.

if you have wget ( curl , links , lynx , whatever ) on remote site and you have access to port 80 outside - you can fetch the bashrc file from some site and source it .

Edit in your home directory the .ssh/config file and addd the following.
Host x
Hostname x
User x

Real answer: Get the System Administrator to give you a home directory.

Workaround answer: I'd create a script in /var/tmp or /tmp and execute it each time you log in. Just make sure you save a copy of it on 'hosta' so you can put it back on there if the administrator cleans it up.