executing .profile with ssh


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users executing .profile with ssh
# 1  
Old 12-21-2004
executing .profile with ssh

Hi, How do I get all my profile settings when connecting with ssh?
# 2  
Old 12-21-2004
Bug

quote:
executing .profile with ssh

Hi, How do I get all my profile settings when connecting with ssh?
------------------------------------------------------------------------------------------------

are you using a remote account or are you accessing your own machine?? secondly are you trying to access it or perform a command line function.. if you are using ssh on a remote account try the "nano" edittor for editting profile file (pico).. if you are accessing your own machine just use any edittor as you would if you were on your machine... .... but if you want to perform a command line execution try rcp (man rcp) to simply send a commad to your machine or a remote machine on the command line envoking rcp and the command that you wish to excute and that should save you the hassle of having to get into your account and fiddle about..
moxxx68
ps .hope that!! helps

re:edit.
if you are trying to transfer your setting from one machine to another copy your profile file and ftp it... again you can use ssh or use rcp.

Last edited by moxxx68; 12-21-2004 at 07:59 AM..
# 3  
Old 12-21-2004
I'm using a remote machine. I try to access a cvs repository but when connecting to it it can't find the correct environment variables because it doesn't run the .profile. So I need a way to set environment variables with ssh. There's nothing wrong with my profile, ssh just doesn't pick up the environment variables of the user account.
# 4  
Old 12-21-2004
try ssh -Xt
in the man pages there are few options that may let you force the connection to perform otherwise.. try it..
moxxx68
# 5  
Old 12-21-2004
the solution:

enable PermitUserEnvironment in ssh_config
add environment file with VAR=VALUE in .ssh directory

--> http://www.openbsd.org/cgi-bin/man.cgi?query=ssh
# 6  
Old 12-21-2004
you know i wouldn't doubt it if the man pages had options that could override the problem that you were having staticaly rather than the global changes that you made.. even though configuring the confi.files should be the first place to search.. that way if you decide to keep the changes you are not constantly messing with options..
thanx for the update
moxxx68
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing profile from any directory other than $HOME

Is there a way to run the profile which is not in $HOME directory? then whats the command for that? (1 Reply)
Discussion started by: SKhan
1 Replies

2. UNIX for Advanced & Expert Users

ssh & load custom profile

i've created a custom profile that contains custom functions and alias' etc... it's called .jason_profile currently we ssh to the server then load the profile manually from the cmd line i.e . /home/jack/.jack_profile we want to be able to ssh and source the profile automatically but... (4 Replies)
Discussion started by: jack.bauer
4 Replies

3. Shell Programming and Scripting

Executing remote commands via ssh

Hi, I'm tryin to write a script that will collect information about a remote servers, put them into variables and print them to screen. # /usr/bin/bash ls $1 > /dev/null 2>/dev/null if then echo "$1 is file" for server in $(cat $1) do # echo $server ... (5 Replies)
Discussion started by: moshesa
5 Replies

4. HP-UX

Remote ssh execution and .profile issues

Greetings, i'm currently having issues in successfully executing a script from one server to other, and i'm cracking my nut in understanding why. Let's get started with the default info: Server A: briozzo@A:/home/briozzo $ uname -a HP-UX A B.11.31 U ia64 2787251109 unlimited-user license ... (3 Replies)
Discussion started by: nbriozzo
3 Replies

5. UNIX for Dummies Questions & Answers

executing a command using ssh

Hi All, I am trying to execute a command using ssh as below. ssh user123@servername "which ctmcontb" It is gving the error as below no ctmcontb in /usr/bin /usr/sbin /opt/sysadm/bin Not sure from where the PATH is getting picked up. But When I login direclty to the server I am... (5 Replies)
Discussion started by: anilreddy103
5 Replies

6. AIX

SSH and a users .profile

How do I get a command like "ssh Theuser@host date" to execute the /home/Theuser/.profile before executing the "date" command? (5 Replies)
Discussion started by: IL-Malti
5 Replies

7. Shell Programming and Scripting

executing commands over ssh

Hi I am trying to send a command over ssh with a parameter but the shell fails to expand the command properly any ideas what am i doing wrong with this. This is ssh on AIX for i in 71 72 73 74 75 do for server in server1 server2 do somestr="Some String" echo "$server... (3 Replies)
Discussion started by: xiamin
3 Replies

8. Shell Programming and Scripting

ssh and executing a for loop

Hi all, I am trying to run a script which is expected to do: on the remote machine, There are two directories /export/home/abc1,/export/home/abc2 i am trying to do, ssh SERVERNAME "for i in `ls -l /export/home/abc*|awk '{print $9}'`; do cd $i; ls -l; done" But its not working ,iam... (11 Replies)
Discussion started by: Jartan
11 Replies

9. Shell Programming and Scripting

Executing .profile from perl script

Hi, How can i execute .profile from a perl script I need this - i am trying to run perl script from crontab and it looses the environment variables Please provide help Your help is greatly appreciated Thanks (1 Reply)
Discussion started by: prekida
1 Replies

10. UNIX for Dummies Questions & Answers

executing .profile

AIX 4.3.3 I am having trouble when logging into the system as userA. It does not seem that the $HOME/.profile is executing. I have checked to make sure the .profile exists in userA's home directory, belongs to userA, and has the file permissions 740. I know the .profile is not being executed... (6 Replies)
Discussion started by: jalburger
6 Replies
Login or Register to Ask a Question