Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copying files from laptop to remote server using SSH Post 302097066 by patwa on Tuesday 21st of November 2006 10:38:08 AM
Old 11-21-2006
Copying files from laptop to remote server using SSH

Hello,

I'm sorry if this sounds like a very simple question, but I'm having some difficulty with it being a complete newbie to UNIx. I use Windows, and always have, but need some UNIX access for work, picking up files from our group space, etc.

Basically, I'm using Cygwin and can SSH into the server using my username and password, and can see the files on there. what I'm not sure of is how to copy files from outside the server, i.e from my laptop.

On windows you would simply do something like copy:
12.34.56.78/C/Docs/myfile.txt to 87.65.43.21/myfile.txt.

But with UNIx, and by proxy cygwin, using the whole idea of a home directory, I'm really not sure how the command would be written, or how the directories would work. Also, how do I write a location that is outside the server when in the server directory structure?

I hope this makes sense, and any help is appreciated.

Thanks.

Hussein.
 

10 More Discussions You Might Find Interesting

1. AIX

copying files to a remote aix server using tar!

Hi, I am using AIX 5.2, and I want to copy some files from one server to a remote server using tar command. Can anybody tell me exact command? Thanks. Aqeel (2 Replies)
Discussion started by: system-admin
2 Replies

2. UNIX for Dummies Questions & Answers

Copying files from a remote server to local system with cygwin

Hi. I'm sorry if I get on people's nerves asking this, but I don't really understand how to do this and unfortunately don't have the time to work through it step by step in books, etc. At University, we have a unix server that hosts our files. we each have a login and password to access it. I... (3 Replies)
Discussion started by: patwa
3 Replies

3. Shell Programming and Scripting

copying files from remote computer

hi, i want to copy files from a remote computer in a network to a specific directory on my PC. ( script ) Forexample , IP of the remote PC is 172.16.5.24 login:aaaa Passw:123 /folder1/file1.txt to my pc folder /fd/awa.txt kinldy help Thanks (2 Replies)
Discussion started by: krabu
2 Replies

4. UNIX for Dummies Questions & Answers

Problem setting up SSH keys between my laptop and a server.

This is probably somewhat trivial but it's driving me crazy. I have 6 servers with identical configurations. I'm trying to set up ssh keys between my laptop (windows XP using cygwin) and these servers (rhel). On 5 of the machines this works perfectly, but on one, no matter what I do, it gives me a... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

5. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

6. UNIX for Dummies Questions & Answers

Help with Copying files between two remote servers

Hi All, Please help me for a shell. I am a New to unix I am trying to DB dump file from one server and copying it to another server. From My Local ServerA connecting to remote ServerB using ssh and taking dump of a instance. That Dump file i need to copy to ServerC. I am able to connect... (6 Replies)
Discussion started by: maddyd2k
6 Replies

7. Shell Programming and Scripting

Multi server access through remote server using ssh

Team, Presently I have 5 ip address kept in ip_abc1 file, for each of the ip address listed, i need to login on each ipaddress one at a time and login as below for that specific ip address ssh -p 8101 karaf@<ip.address_for the specific ip address as logged in> password features:list... (4 Replies)
Discussion started by: whizkidash
4 Replies

8. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

9. Shell Programming and Scripting

Copying files to remote server

I am trying to copy code to remote server, doing something like this However it is copying one file and than the script exits i=0; j=0 while read fn; do dir=${fn%/*} # Gets directory path fnm=${fn##*/} # Gets filename excl. path rgx_nwk="s/${nwk}/${nwk}.sac/g" ... (2 Replies)
Discussion started by: kristinu
2 Replies

10. Shell Programming and Scripting

Copying a text file from my Ubuntu Windows Sub System to a remote instance through SSH

*Following questions involves use of YAML, BASH, SSH and Software called Ansible* I am trying to learn how to use a Linux environment (in my case a Ubuntu Windows Sub System) to copy a text file from my files to a remote instance (in this case Amazon Web Services) by connecting via SSH. I... (8 Replies)
Discussion started by: Suhaba
8 Replies
mnthome(1)						    BSD General Commands Manual 						mnthome(1)

NAME
mnthome -- mount an AFP (AppleShare) home directory with the correct privileges SYNOPSIS
mnthome [-v] [-d] [-m mntpath] [-n] [-b] [-p password] [-i] [-x mount point] [-u] [-s] DESCRIPTION
The mnthome command unmounts the AFP (AppleShare) home directory that was automounted as guest, and remounts it with the correct privileges by logging into the AFP server using the current username and password. This command also allows you to have guest access turned off on your AFP server too and still have AFP home directories work with "su". When you ssh into another computer using an account that has an AFP home directory or you "su <netuser>" where <netuser> is an AFP home directory user, then the resulting home directory will not have the correct access privileges. This is because automount is assuming NFS behavior which assumes that all computers share the same user/group privileges and mounts volumes using "no security" and lets the client enforce privileges based on the current user. AFP is different since the privileges are based on the user that logged into the server. Since automount does not put up an authentication dialog asking for an user name and password, automount mounts the fileserver using guest login. Thus you end up with getting the world access privileges and the privileges are shown via "mapping". You also would have to allow guest access to the server to that sharepoint. Mapping makes all the files/folders appear like they are owned by the current user. Even those items not really owned by the current user show up as being owned by the current user. The server provides user access rights (UARights) which is a summary of what the access rights are regardless of the category (owner, group, world) from which they were obtained. When doing "mapping", the AppleShare client will take these UARights and show them as the owner rights. So, everything looks like it is owned by the current user and the owner rights are set to the UARights. Thus if you had access to that file/folder before, then you still do. The options are: -v Display version number. -d Print debugging information. -m Alternative mount point is specified with the -m option followed by a path to an existing directory. Normally, the volume is mounted in /Network/Servers/ or /var/automount/Network/Servers/. -n Do not force the unmount of the previous mount point. -b Exec the user's shell after mount of home. -p A password may be specified with the -p option followed by a password. If this option is not used, then the user will be prompted to enter in a password. -i Display information about the AFP home mount point. -u Attempt to unmount the current home directory mount. -x This option must be followed by a path to an existing AFP mount point. Display information about the mount point. -s Skip preflight check to see if the currently mounted home directory is already correctly mounted for the user. EXAMPLES
The following example illustrates how to mount an AFP home directory: mnthome This example shows how to print the debugging information and provide a password: mnthome -d -p foobar SEE ALSO
mount(2), unmount(2), mount(8) mount_afp(8) BUGS
I get the mounting url from the "home_loc" attribute and the mountpath from the "home" attribute (with the path from home_loc subtracted out). If your AFP home directory automounts in a different location, then you need to use the -m option to specify an alternative mount point. I cant figure out how to cd out of the current home dir so I can do the unmount and then restore the user back into the new home dir. If you are in the AFP home directory when you use mnthome, you automatically get put back into that same directory when mnthome leaves. If mnthome works, then your current directory is a dead directory and you need to "cd ~" to get to your new home directory. If the server with the home directory was already mounted by another user, you will not be able to replace it with a mount made by your user id. The original mount must be first unmounted by the mounting user or root. HISTORY
The mnthome command first appeared Mac OS X version 10.3. RETURN VALUES
0 mnthome successfully remounted the AFP home directory. [EINVAL] Invalid arguements were passed in. [EPERM] The current AFP home directory could not be unmounted by mnthome because the current user does not have the correct access. The current AFP home directory was probably mounted by another user first. [EAUTH] Incorrect password. Mac OS X August 4, 2004 Mac OS X
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy