LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2014, 09:01 PM   #1
Srinivas Gadi
LQ Newbie
 
Registered: Dec 2012
Posts: 22

Rep: Reputation: Disabled
Unable copy file from one machine to other while ssh


Hi All,

I used copy some alias which are created in my local desktop to remote machine by placing all command in .bash_profile,now the problem is that we are using the 12.04 and .bash_profile is not being to copied to remote machine while ssh itself.

Hope you are clear my requirement.
can some please advise how can I conquer this ?

Thx in Advance
Srinivas
 
Old 02-03-2014, 09:33 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I may be missing something here, but to copy files from one computer to another, you use scp, not ssh.

The basic syntax is

Code:
scp [filename] [targetIP]:/[path-to-some-writable-directory]   <-----send a file
scp [targetIP]:/[path-to-some-file] [path-to-local-target-directory]   <-----call a file
See man scp for more.

Last edited by frankbell; 02-03-2014 at 09:34 PM.
 
Old 02-03-2014, 10:44 PM   #3
Srinivas Gadi
LQ Newbie
 
Registered: Dec 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thank you for your quick response.

I am aware of the scp command to copy to different machine.

Earlier(Lucid OS) I used to gather all symlinks and alias in .bash_profile, when I tried to login to any different remote host my .bach_profile would be loaded in remote host and I can use all symlick and alias.
but now we were upgraded to 12.04 where existing user profile has not being loaded where as it create a new profile in remote host.

fox Eg:
machine A
$cat > .bash_profile
$alias c='clear'
$few sylinks
Z^

$cat .bash_profile
alias c='clear'
few sylinks

$ssh MachineB
$cat .bash_profile
$Nothing here

So I wanted to my .bash_profile has to be copied to remote host where ever I logs in.

Hope you clear my point, please let me know if you need any more questions.
 
Old 02-06-2014, 05:11 PM   #4
Srinivas Gadi
LQ Newbie
 
Registered: Dec 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Could any one answer my question plz................
 
Old 02-06-2014, 05:35 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
if you dont have .bash_profile, do you have .bashrs? do a ls -laF .bash* after you ssh over to the other system to see what is there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ssh port 22: Connection timed out ( Unable to Copy file remotly ) bp_vanarse Linux - General 3 04-03-2010 08:53 PM
unable to ssh into a machine.. wrapster Linux - Networking 8 08-24-2009 02:39 AM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 01:23 PM
unable to ssh my machine in any way - any ideas? mr_furley Linux - Networking 17 07-03-2006 10:00 AM
copy/ftp/sftp/rsync from ssh'd machine allelopath Linux - Software 5 05-05-2005 03:16 PM


All times are GMT -5. The time now is 05:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration