LinuxQuestions.org
Visit Jeremy's Blog.
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, 08: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, 08:33 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
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 08:34 PM.
 
Old 02-03-2014, 09: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, 04: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, 04:35 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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 07:53 PM
unable to ssh into a machine.. wrapster Linux - Networking 8 08-24-2009 01:39 AM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
unable to ssh my machine in any way - any ideas? mr_furley Linux - Networking 17 07-03-2006 09:00 AM
copy/ftp/sftp/rsync from ssh'd machine allelopath Linux - Software 5 05-05-2005 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:36 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
Open Source Consulting | Domain Registration