ssh with passphrase [closed] - ssh

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 11 years ago.
Improve this question
ssh user#host works (in a script via Apple Terminal)
does anybody know an easier way than ssh-agent to combine the passphrase with the ssh command ?
regards

You can use:
sshpass -p password ssh user#host
However if you wanted the luxory of not typing in your password, I would HIGHLY suggest setting up public/private ssh keys:
http://www.ece.uci.edu/~chou/ssh-key.html
and http://www.linuxproblem.org/art_9.html
This is extremely secure, and very convient.

For scrub just take a look to the configuration files of your installation of open ssh, cause you'll find every single option you can include or deactivete while you connect to the server. There is an option of fusemount for example if you'd like to have your machine conneted to the one in which you're logging in ( i used it with my netbook when they were REAL netbook and not computers). Fusemount is an option when you want more abilities to be added to you computer or you need data from both sides (the one of the server and the one of the client) but security cannot be omitted in any case.

Related

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

SSHing in to EC2 Ubuntu instance with user ubuntu tells me to login as ubuntu [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 9 years ago.
Improve this question
I'm having an issue where I try to SSH into my API server (EC2 instance running Ubuntu). I've been SSH'ing in just fine for the past few weeks, but I suspect I messed something up because now it tells me to login as user ubuntu (I am!) :
% ssh ubuntu#ec2-50-17-143-255.compute-1.amazonaws.com -i ~/dev/key.pem
Please login as the user "ubuntu" rather than the user "root".
Is there something I could have done to mess with the ubuntu user? Is there anyway to resolve this without having to save the AMI and boot up a new instance?
Please use ssh -v ... or ssh -vv ... to see what is going on.
In your case it looks like you copied ~root/.ssh/authorized_keys to ~ubuntu/.ssh/.
According to this, the root account is configured to reject logins with this message using the authorized_keys file. If you copied this file, now the user ubuntu will reject logins with this key, too...

What is the difference between bin/sh, bin/bash, sbin/nologin, bin/tcsh, etc? [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 9 years ago.
Improve this question
I am new to linux so please go easy and talk slow =)
In Plesk I have some options for accessing the server over SSH. I just want to connect, add my public key and run rsync for backup.
What is the difference between these options?
Which option should I choose?
What are these? They look like directories to me.
Access to the server over SSH:
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
/bin/bash (chrooted)
/bin/rbash
Here is an image of the Plesk control panel:
Use /bin/bash
What are these? They look like directories to me.
These are different options for default shell given to users who connect via SSH
If you haven't used any of these shells before, I think bash is the best option for you. Most tutorials and articles for linux commands online assume you are using bash.
However, you have two options for bash: /bin/bash and /bin/bash (chrooted).
To do backups, you will probably need the bash to have full access to execute all commands.
I'm not sure whether you can get what you want done with a chrooted bash.
Basically, chrooted bash is for avoiding mishaps.
To know more about chrooting, you can read this article
Most of options are various Unix shells. A shell is basically what interprets the text that you type in the window. Some people prefer one shell over others. If you are not familiar with any shell in particular, pick one based on your needs Comparison Chart
If you don't know, you should use /bin/bash. It's the most popular, and will be the easiest for you to get help using. That said, they all do the same thing, just in slightly different ways.

automatic ssh session when moving to mapped sshfs [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 11 years ago.
Improve this question
If you have a network drive mapped via sshfs, is there a way to automatically log on via ssh whenever changing to that directory?
$USER:$LOCALHOST:~: sshfs $USER:$REMOTEHOST /Volumes/dev0
$USER:$LOCALHOST:~: cd /Volumes/dev0
$USER:$REMOTEHOST:~
Thomas Jansson provides a guide on integrating sshfs with autofs. I'll summarize his guide here, so this answer will still be worth something if his site ever goes offline:
Create an /etc/auto.master:
/mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost
Make sure your uid and gid match your userid and guid in /etc/passwd or whatever you use to provide system accounts.
Now add lines into /etc/auto.sshfs, one per desired filesystem, in the following form:
bar -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#tjansson#bar.com\:
Be sure to change tjansson#bar.com to whatever user account and hostname you're going to be using. Change the leading bar to whatever you'd like the directory to be named. When you cd /mnt/sshfs/bar, autofs will automatically mount the FUSE filesystem for you. Of course, using SSH keys and the ssh-agent(1) will make this far more pleasant.
Update
... create a directory that literally logs you into the other machine.
Hey, that's pretty clever idea. You could either write a shell function that checks the directory name you want to cd into and start a new ssh for you. Maybe you can (ab)use the PROMPT_COMMAND variable to ssh to the host if the directory name matches. Be warned that either approach will slow down your normal cd or every prompt display.
Another approach that I've used and enjoyed is a small little helper script, ~/bin/ssh-to:
#!/bin/bash
hostname=`basename $0`
ssh $hostname $*
Symlink new names to this shell script: ln -s ssh-to sarnold.org and then you can run a command or log in on a remote site without typing the ssh all the time:
sarnold.org python foo.py
It'll log you in to whatever machine you've used for the name of the symbolic link and run whatever command you give it.

scp error when copying files [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 11 years ago.
Improve this question
I am trying to use the scp command but I'm getting the following error:
permission denied
lost connection
I get this when I use scp to copy a file from a master node to a slave node.
This is probably more like your error, ya?
Permission denied (publickey).
lost connection
The simplest problem is that you don't have permissions to access the directories specified on at least one end of the copy operation, or you may just have a bad login.
You could try using sudo chown -R
*username* to make sure you have rights to the target directories on
both ends.
Check your directory specifications, make sure that you are using ~/Documents for instance instead of /Documents. Very different locations.
If you've got a bad login, I can't help you there, sorry. Try just ssh-ing into the target(s) make sure you can.
You could check out the manpage for more help
I think error in giving permission to folder which has the authorized_keys file
use chmod and set the permissions