STEllAR-GROUP / rostam-docs

0 stars 1 forks source link

SCP and SFTP for file transfer not working #12

Closed straubar closed 4 years ago

straubar commented 4 years ago

I am unable to upload a file from my local hard drive to Rostam using SCP or SFTP. The verbose output from SCP suggests that a connection is established. Then nothing happens. I tried it also directly using an SFTP client, which was able to connect but then times out after 20 seconds (client setting).

This is the output from the SCP client: rostam

akheir commented 4 years ago

I don't see any problem on my machine. Could you try another client? Windows powershell has scp command, there is also winscp to try. I don't see any problem here and since you have logged in you should be able to transfer files.

straubar commented 4 years ago

I tried it from a Linux machine this time, one within our university's network and one from outside. The same problem there. Here is a detailed log of what happens. It seems that some initial bytes are tansferred, but eventually it freezes. No files were created on the Rostam side. The file I wanted to transfer is 16384 bytes long, so you can see that the freeze occured long before reaching the end of the file: pool_scp.log

akheir commented 4 years ago

Thank you for trying other machine and sending me the detailed logs. The problem was two lines of codes in you .bashrc once I commented out them the problem solved.

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github

I don't know what was the intention of those lines but they were not doing the correct job.

If you want to add another key to your account to login with that key, you should copy the content of the public key to .ssh/authorized_keys. Look at this page in Rostam's wiki for more detail.

If you want to login to another machine or github account with public key, you should copy the content of your public key .ssh/id_rsa.pub to that machine or github account.