g46905
asked on
Need something like WinSCP for unix environment for SSH2 file transfer
I am using Unix environment and would like to transfer a file using SSH2 protocol. We also need to do a key exchange in the process. Can you help me with this? Is there any substitute for WinSCP which can be used in UNIX enviroment. Please let me know if you need additiona info
Unix's ssh is shipped with 'scp' command. But it's command line interface only. Do You need windows?
ASKER
I need UNIX. Can you give me an example using scp command in UNIX
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I path the private key along with the command?
-i /path/to/private/key # it have to be RO for running user
ASKER
what is RO ?
ASKER
when I use -i /path/to/private/key as mentioned above, I am getting "Not a directory". Can you tell me why?
read-only
You are not using the literal
-i /path/to/private/key
Do You? You have to put there path to Your keyfile
-i /path/to/private/key
Do You? You have to put there path to Your keyfile
ASKER
what is a literal. Below is what I am doing. Please let me know if I am doing incorrect?
scp myfile userid@hostname:myfile1-i /local/private/keyfile
where "myname" is the file on the local system that you wish to copy, userid@hostname is the userid and hostname where you wish to copy it, and "myfile1" is the name I want to call the file on the remote system. "keyfile" is my private key I want to exchange.
scp myfile userid@hostname:myfile1-i /local/private/keyfile
where "myname" is the file on the local system that you wish to copy, userid@hostname is the userid and hostname where you wish to copy it, and "myfile1" is the name I want to call the file on the remote system. "keyfile" is my private key I want to exchange.
> /local/private/keyfile
And it's valid path?
ls -l /local/private/keyfile
also, You may try: scp -vvv ...same options...
And it's valid path?
ls -l /local/private/keyfile
also, You may try: scp -vvv ...same options...
ASKER
I did "ls -l /local/private/keyfile" and it works fine. But when I do "-i /local/private/keyfile", it doesn't work...
What kind of unix You run?
What shows: ssh -v
What shows: ssh -v
ASKER
Below is what I see for "ssh -v". ?
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
Usage: ssh [options] host [command]
Options:
-l user Log in using this user name.
-n Redirect input from /dev/null.
-F config Config file (default: ~/.ssh/config).
-A Enable authentication agent forwarding.
-a Disable authentication agent forwarding (default).
-X Enable X11 connection forwarding.
-x Disable X11 connection forwarding (default).
-i file Identity for public key authentication (default: ~/.ssh/identity)
-t Tty; allocate a tty even if command is given.
-T Do not allocate a tty.
-v Verbose; display verbose debugging messages.
Multiple -v increases verbosity.
-V Display version number only.
-q Quiet; don't display any warning messages.
-f Fork into background after authentication.
-e char Set escape character; ``none'' = disable (default: ~).
-c cipher Select encryption algorithm
-m macs Specify MAC algorithms for protocol version 2.
-p port Connect to this port. Server must be on the same port.
-L listen-port:host:port Forward local port to remote address
-R listen-port:host:port Forward remote port to local address
These cause ssh to listen for connections on a port, and
forward them to the other side by connecting to host:port.
-D port Enable dynamic application-level port forwarding.
-C Enable compression.
-N Do not execute a shell or command.
-g Allow remote hosts to connect to forwarded ports.
-1 Force protocol version 1.
-2 Force protocol version 2.
-4 Use IPv4 only.
-6 Use IPv6 only.
-o 'option' Process the option as if it was read from a configuration file.
-s Invoke command (mandatory) as SSH2 subsystem.
-b addr Local IP address.
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
Usage: ssh [options] host [command]
Options:
-l user Log in using this user name.
-n Redirect input from /dev/null.
-F config Config file (default: ~/.ssh/config).
-A Enable authentication agent forwarding.
-a Disable authentication agent forwarding (default).
-X Enable X11 connection forwarding.
-x Disable X11 connection forwarding (default).
-i file Identity for public key authentication (default: ~/.ssh/identity)
-t Tty; allocate a tty even if command is given.
-T Do not allocate a tty.
-v Verbose; display verbose debugging messages.
Multiple -v increases verbosity.
-V Display version number only.
-q Quiet; don't display any warning messages.
-f Fork into background after authentication.
-e char Set escape character; ``none'' = disable (default: ~).
-c cipher Select encryption algorithm
-m macs Specify MAC algorithms for protocol version 2.
-p port Connect to this port. Server must be on the same port.
-L listen-port:host:port Forward local port to remote address
-R listen-port:host:port Forward remote port to local address
These cause ssh to listen for connections on a port, and
forward them to the other side by connecting to host:port.
-D port Enable dynamic application-level port forwarding.
-C Enable compression.
-N Do not execute a shell or command.
-g Allow remote hosts to connect to forwarded ports.
-1 Force protocol version 1.
-2 Force protocol version 2.
-4 Use IPv4 only.
-6 Use IPv6 only.
-o 'option' Process the option as if it was read from a configuration file.
-s Invoke command (mandatory) as SSH2 subsystem.
-b addr Local IP address.
I can see -i option is/should_be supported. I don't know why it will not work.
try: ssh -vvv ..., maybe it will print some info why reading the file fails
try: ssh -vvv ..., maybe it will print some info why reading the file fails
ASKER
I have tried that it gives me the same result ?
If you have a GUI on that system, such as nautilus for GNOME, you can simply type this into your address bar: ssh://userid@hostname and then browse the remote system just like WinSCP would.
ASKER
I have learned that our network does not allow using SCP for external transfer of files?
When I use the below mentioned command....it doesn't work.
scp -t -d " + remoteTargetDirectory
Since SCP is not permissable, can you suggest an alternative that would do similar job?
When I use the below mentioned command....it doesn't work.
scp -t -d " + remoteTargetDirectory
Since SCP is not permissable, can you suggest an alternative that would do similar job?