Sending files and directories using scp [closed] - scp

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to send the following files from my computer to a remote computer using scp.
Directory1
File1
File2
Directory2
File3
File4
...
How can I send File1, File2, etc. such that they are saved to the same directories on the remote computer as they are on my computer (e.g. Directory1 and Directory2 are created on the remote computer and Directory2 contains File3 and File4)?

Copy the directory "foo" from the local host to a remote host's directory "bar"
scp -r foo your_username#remotehost.edu:/some/remote/directory/bar
The -r tells it to copy recursively.

Related

how to setup ssh and "ssh_config" file correctly [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have noticed while learning how to setup ssh that lots of stackoverflow posts referred to the file ssh config being inside of the folder ~/.ssh but when i look at the same folder in my macbook the files listed are:
created from my last ssh setup
someprivatekey
someprivatekey.pub
known_hosts
now when i inspect the folder cd /etc/ssh/ then i can see the file ssh_config there.
Is it a normal behavior or should ssh file "ssh_config" always be located in "~/.ssh" folder and I have presumably a wrong configuration?
(Sorry if the post sound very elementary, i am learning how to use ssh)
how to should i setup ssh and the "ssh_config" file correctly?
The file in /etc/ssh affects all users on the machine, while the one in ~/.ssh affects only you. You can find a complete list of the file locations at the end of the ssh manpage (which should be available at your computer by running man ssh).

Warning: Identity file not accessible: No such file or directory [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I currently have access to a supercomputer cluster.
The problem starts when I enter.
When I try to perform the following command line ssh -i user # extension, I get the following error
Warning: Identity file user # extension not accessible: No such file or directory.
I have tried testing the public root key and if it recognizes it, instead when I run in /home/user, I get the error.
I've been trying some permission changes with the chmod command and I can't get a solution.
ssh -i is to reference a private ssh key.
So if you have a key pair named user.rsa/user, that might work.
But in your case, "user" is not the name of the key, but simply the remote user you want to open a secure shell with on the remote server
ssh user#remoteServer
You don't need -i, if you have a default id_rsa/id_rsa.pub key pair in your local ~/.ssh

How can I set default umask in gnome on Debian-Stretch? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I would like the permissions on files that I create with gnome apps (e.g., gedit and libreoffice) to respect the umask I set.
I have set umask to 027 in ~/.profile and /etc/login.defs. I've also followed the directions from here by adding a line to /etc/pam.d/common-session: How to set system wide umask?
Nothing is working.
I am able to get the umask setting to work if I create files in vi or nano from gnome-terminal (after setting umask 027 in .bashrc). But I would like to get this umask respected in gnome apps like gedit also.
Gnome applications in question are likely launched by systemd user instance, which sets the umask to 022 regardless the umask configured using PAM.
This question has also been asked on U&L SE and has more answers there.

WinSCP Cannot overwrite. Permission issues [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
On my remote server A, I have a bunch of .py files.
I drag those files to a Windows machine, B, via WinSCP.
I work on these files on the Windows machine and want to import them back to server A via WinSCP.
When I try that, it says "cannot overwrite".
Obviously it's a permissions issue. I am not sure how much permission I need to give in order to have the overwrite access.
Currently, I have -r--r--r-- on these files for reading.
I am guessing I need write access? Or do I need execute access as well?
Will chmod 755 * be sufficient? I want to be careful with permissions so I am asking on here.
That depends on what users are owner of the files and the one you connect with SCP.
If they are the same, then '-rw-r--r--' should be enough.
If they are on the same group then -rw-rw-r--

Chmod permission of specific file extension under a folder via SSH [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My folder is /images/. There are .png, .gif and .jpg images in this folder. How do I change permissions of specific file extension .jpg to 644 under the folder via SSH?
Connect to the remote computer with ssh and then execute this command may work:
find /images/. -name "*.jpg" | xargs chmod 644