Using the same configuration on a new machine - Fedora
Hello everyone,
I have had my SSH set up on my laptop by a friend. Now, I have a new machine and I was told that I can copy certain files from the old Fedora to the new one and log start the SSH through the Terminal window the same way, without having to reinstall anything.
I have copied the files from /home/.ssh but I think there is so much more to that.
If anyone is willing to help me with this, I will put together all the info into a guide so that others can benefit from it too.
To mention is that I use Fedora 28 and the way I log in is by opening a Terminal window - typing the command "tun" and entering the password to unlock the private key.
I have installed FISH and VIM.
Thank you
1 Reply
I generally configure my login and ssh-agent setup with a section added to .bashrc like this:
source ~/.z >/dev/null 2>&1
export SSH_AGENT_PID
P=`ps -x |grep $SSH_AGENT_PID|grep -v grep `
if [ "$P" ]
then
echo '';
else
ssh-agent > ~/.z
source ~/.z >/dev/null 2>&1
ssh-add
fi
export SSH_AGENT_PID
export SSH_ASKPASS
export SSH_AUTH_SOCK
You'll probably want to look at the tun command to see what your friend has set up for you.
Try which tun or cat ~/bin/tun just guessing though on 2nd.
A friend I worked with named David Lowe showed me how to do that when I worked at Internet Direct, Inc. =) Sometimes you have to tweak the ps|grep line a little to get just what you want, just the current ssh-agent line to match against. That bit is what I just set up on my Fedora 28 VM. I've been using Arch more lately, seems a little speedier in a VM running under Windoze. I use a bash script called sshr to connect to my linode:
#!/bin/bash
ssh -p 2200 return.perl-user.com
# cuz it gets less login attempts on a non-standard
# port
phil AT perl-user.com