Need a script to open ssh connections [closed] - shell

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
My entirely new to MAC OS.
I am using MAC Terminal to connect to Linux servers (using SSH)
Is there a way to write a .command file to connect to the Linux servers, just by executing the .bat file from desktop?

Look at ssh client configuration and key-based authentication (man ssh and man ssh_config). You can configure all that so the command reduces to ssh hostname without writing any shellscript code. You can even assign a short name to a host.
For example (in ~/.ssh/config):
host abc
hostname remotehost.domain.tld
identityfile ~/.ssh/abc.dsa
user myuserid
Assuming you've generated and uploaded the corresponding public key, you can connect with the command
ssh abc

Related

How to scp via an intermediate computer [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 am on computer A and in order to ssh into computer C I have to ssh into computer B and then ssh from there. I have a one line bash script that does this with
ssh -XJ user#compB user#compC
How can I write a bash script to let me copy a file or files from compA to compC?
ProxyJump is just as available with scp as it is with ssh; there just isn't a -J shortcut on all versions of the command-line tool, so you can need to spell it out the long way.
scp -o 'ProxyJump user#compB' ./your-local-file user#compC:/path/to/your-remote-file
Community Wiki since this question isn't on-topic here, and would be better suited to Unix & Linux Stack Exchange
The best way would be to make a server VPN on a computer B and then make an SCP from computer A to computer C using the VPN (computer B).
Otherwise, you make ssh keys from a->b and from b->c so that ssh doesn't ask you the passwords, that you make:
computer_A:$ scp -r myfilesfolder/ myuser#computerB:.
computer_A:$ ssh myuser#computerB scp -r myfilesfolder/ myuser#computerC:.
or another way is, install sshfs look this and then you mount the folder you want to copy in computer A in computer B and after you mount the folder in computer B in computer C. After that you copy as usual the files in the mounted folder.

Ssh from Ubuntu to Windows 7 [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 was just about to try sshing for the first time and before I get into it, I want to know what's the best way to go about it. In particular, I'm currently running Linux through crouton on an HP chromebook and I want to ssh into and old windows 7 pc. Ideally I would love to have some sort of bash shell inside the windows ssh as I'm not so confident with cmd but I can make do. Are there any packages/apps that I should install on my old pc before I start trying. Preferably if there was something like WSL but for windows 7 that'd be great but I can't seem to find anything like it.
there is no ssh daemon (service) for windows from Microsoft.
So installing shell on windows, it is only about run it locally.
To connect with ssh on remote windows, you should install 3rd party ssh server on windows.

How to let other people use ssh to connect to my computer? [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 6 years ago.
Improve this question
My operating system is Mac OS X.
I want to use bash command to let other people use ssh to connect my computer.
How do I do?
set up a user account for them on your computer;
allow logon privileges for the user.
OS X Server puts a pretty GUI face on doing this.
You need to edit the /etc/ssh/sshd_config file and add the user to the end of the file with the following syntax. Also that user will need to be a valid user on the local machine or found in a bound directory service.
vi /etc/ssh/sshd_config
AllowUsers username1
There are other settings you can set in regards to ciphers and keys that improve security. Also you may need to modify any firewall settings that may be in place.

SSH connection using another port in OS X? [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 8 years ago.
Improve this question
I want to connect through the terminal in OS X to my Linux server with SSH - But how do i connect if i changed the SSH port to, lets say, 5000 instead os 22?
Use the command line option -p for ssh:
ssh -p 5000 host

Is it possible to copy files from one computer (which is remotely accessing another one through terminal) to the other one? [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 8 years ago.
Improve this question
I'm using a Mac to remotely access a computer in my university's computer lab. The Mac serves as a terminal. If I need to transfer some files from my computer into the one in the lab, is it, firstly, possible? If yes, then please guide me to it.
Absolutely, use the UNIX / Linux command scp (secure copy):
$ scp user#server:directory/SourceFile TargetFile
Update based on OP's response:
$ scp path/to/my/file.txt user#server.com:/path/to/copy/to/file.txt

Resources