Sponsored Content
Full Discussion: executing .profile with ssh
Top Forums UNIX for Advanced & Expert Users executing .profile with ssh Post 59474 by moxxx68 on Tuesday 21st of December 2004 06:51:07 AM
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..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

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

8. 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

9. 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

10. 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
RCP(1)							      General Commands Manual							    RCP(1)

NAME
rcp - remote file copy SYNOPSIS
rcp [-p] [-x] [-k realm ] [-D port] [-N] [-PN | -PO] file1 file2 rcp [-p] [-x] [-k realm] [-r] [-D port] [-N] [-PN | -PO] file ... directory DESCRIPTION
Rcp copies files between machines. Each file or directory argument is either a remote file name of the form ``rhost:path'', or a local file name (containing no `:' characters, or a `/' before any `:'s). By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modified by the umask(2) on the destination host is used. If path is not a full path name, it is interpreted relative to your login directory on rhost. A path on a remote host may be quoted (using , ", or ') so that the metacharacters are interpreted remotely. Rcp does not prompt for passwords; it uses Kerberos authentication when connecting to rhost. Each user may have a private authorization list in a file .k5login in his login directory. Each line in this file should contain a Kerberos principal name of the form princi- pal/instance@realm. If there is a ~/.k5login file, then access is granted to the account if and only if the originater user is authenti- cated to one of the principals named in the ~/.k5login file. Otherwise, the originating user will be granted access to the account if and only if the authenticated principal name of the user can be mapped to the local account name using the aname -> lname mapping rules (see krb5_anadd(8) for more details). OPTIONS
-p attempt to preserve (duplicate) the modification times and modes of the source files in the copies, ignoring the umask. -x encrypt all information transferring between hosts. -k realm obtain tickets for the remote host in realm instead of the remote host's realm as determined by krb_realmofhost(3). -r if any of the source files are directories, copy each subtree rooted at that name; in this case the destination must be a directory. -PN -PO Explicitly request new or old version of the Kerberos ``rcmd'' protocol. The new protocol avoids many security problems found in the old one, but is not interoperable with older servers. (An "input/output error" and a closed connection is the most likely result of attempting this combination.) If neither option is specified, some simple heuristics are used to guess which to try. -D port connect to port port on the remote machine. -N use a network connection, even when copying files on the local machine (used for testing purposes). Rcp handles third party copies, where neither source nor target files are on the current machine. Hostnames may also take the form ``rname@rhost'' to use rname rather than the current user name on the remote host. FILES
~/.k5login (on remote host) - file containing Kerberos principals that are allowed access. SEE ALSO
cp(1), ftp(1), rsh(1), rlogin(1), kerberos(3), krb_getrealm(3), rcp(1) [UCB version] BUGS
Rcp doesn't detect all cases where the target of a copy might be a file in cases where only a directory should be legal. Rcp is confused by any output generated by commands in a .login, .profile, or .cshrc file on the remote host. Kerberos is only used for the first connection of a third-party copy; the second connection uses the standard Berkeley rcp protocol. RCP(1)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy