How can I setup something that allows me to run an automated file transfer from my Linux system to my webhost? I'm trying to set things up so that copies of the nodelist etc. are sent there when updated on this new box.
I would just use binkd and a filebox.
On 13 Feb 2021 at 05:35p, deon pondered and said...
I would just use binkd and a filebox.
I can't see how I can install and run these on my webhost... I only have cPanel access and not any Linux command line access to their server.
I think I need to find a way to run a scripted and automated login
process to pass via SCP or SFTP the files I want to my commerical webhost provider... I think... :)
I started to look at scp and sftp but on Linux I am lost.
I can't see how I can install and run these on my webhost... I only have cPanel access and not any Linux command line access to their server.
I'm stuck, on windows I had a batch file that called WinSCP and passed some commands to a .tmp file that was in turn used by WinSCP. It essentially logged in as a user and supplied password then does a 'put
%1' so that the main batch file can be called with an additional file
that you wanted to FTP to the webhost.
If you want to run the commands non-interactively (without entering the password) you have to use authentication with a public/private key. genrate a ssh key on the local machine and put the public key to the server. Your webhosting provider should have instructions how to do
this. Default is ~/.ssh/authorized_keys. See man ssh-keygen.
On 13 Feb 2021 at 09:21a, Oli pondered and said...
If you want to run the commands non-interactively (without entering
the password) you have to use authentication with a public/private
key. genrate a ssh key on the local machine and put the public key
to the server. Your webhosting provider should have instructions
how to do this. Default is ~/.ssh/authorized_keys. See man
ssh-keygen.
I generated a key locally, copied the public key and enabled it on my webhost now am stuck trying to get things to work using scp or (as yet) untested sftp etc..
It's so frustrating and demoralizing trying to get something that should
be simple to work :(
could you give us more details. error messages or an example where you
are stuck.
scp -i /home/avon/.ssh/id_rsa testing.txt user@domain.com
The syntax for the destination is user@host:/path
If what you typed is above, then you effectively just "copied" the file test.txt to user@domain.com (on the local system).
If what you typed is above, then you effectively just "copied" the file test.txt to user@domain.com (on the local system).
ssh: connect to host bbs.nz port 22: Connection timed out
lost connection
ssh: connect to host bbs.nz port 22: Connection timed out
lost connection
when I tried the command again it just goes blank... no prompts or anything..
then after some time I get the timeout message again...
Yup, indiciating its firewalled out.
Sounds like your trying to do things the hard way, To transfer between systems or backup stuff I use rsync. You were using scp which uses ssh
as well.
Yup, indiciating its firewalled out.
On there end or do you think I need to run something on my end to open a port
/ check it's open?
On 14 Feb 2021 at 11:30a, deon pondered and said...
Yup, indiciating its firewalled out.
Have approached my webhost about enabling ssh access.... I may need to ask first says the only help files...
Meanwhile you can use ftp.
I don't understand why webhost still offer (unencrypted) ftp-only
access. Even if they don't want to give you shell access. There are restricted shells for ssh and sftp servers available.
On 14 Feb 2021 at 11:30a, deon pondered and said...
Yup, indiciating its firewalled out.
Have approached my webhost about enabling ssh access.... I may need to ask first says the only help files...
On 14 Feb 2021 at 08:51a, Oli pondered and said...
Meanwhile you can use ftp.
I don't understand why webhost still offer (unencrypted) ftp-only
access. Even if they don't want to give you shell access. There are
restricted shells for ssh and sftp servers available.
I have spent the day on and off trying to get access and still can't. It's jolly frustrating... partly because I am not sure I am even doing it
right :)
But I try and pass things like
Permission denied, please try again.
ken@bbs.nz's password:
If it's asking you for a password like this it doesn't use the public
ssh key for authorization (maybe it's in the wrong location on the
server or hasn't been installed correctly). You are either using a wrong password, a wrong username or don't have ssh access for that machine.
scp has not liked the destination I have been trying to send a local file to and squawks about it being a directory...
On 02-13-21 19:20, Avon wrote to All <=-
How can I setup something that allows me to run an automated file
transfer from my Linux system to my webhost? I'm trying to set things
up so that copies of the nodelist etc. are sent there when updated on
this new box.
I started to look at scp and sftp but on Linux I am lost.
On 02-13-21 00:25, Al wrote to Avon <=-
I find the scp syntax is not intuitive but I have done this with a scp before. If I can help, let me know.
On 02-14-21 13:12, Avon wrote to Oli <=-
scp -i /home/avon/.ssh/id_rsa testing.txt user@domain.com
then the command seems to be accepted and I get a new linux command prompt.
I have no idea if the file has been sent or where it went.
On 02-14-21 13:24, Avon wrote to deon <=-
On 14 Feb 2021 at 11:15a, deon pondered and said...
If what you typed is above, then you effectively just "copied" the file test.txt to user@domain.com (on the local system).
ssh: connect to host bbs.nz port 22: Connection timed out
lost connection
On 02-14-21 15:15, Avon wrote to deon <=-
On 14 Feb 2021 at 11:30a, deon pondered and said...
Yup, indiciating its firewalled out.
On there end or do you think I need to run something on my end to open
a port / check it's open?
On 02-14-21 22:00, Avon wrote to Oli <=-
And my country looks to be moving alert levels because of a coivd scare too... was going to work in the office but now working from home
tomorrow.
Vk3jed wrote to Avon <=-
On 02-14-21 13:12, Avon wrote to Oli <=-
scp -i /home/avon/.ssh/id_rsa testing.txt user@domain.com
then the command seems to be accepted and I get a new linux command prompt.
OK, there's no path information, so the file wasn't actually
sent, it was just copied locally to a file called user@domain.com
The syntax you need is scp -i /home/avon/.ssh/id_rsa testing.txt user@domain.com:/path/to/destination
I have no idea if the file has been sent or where it went.
Usually no response is good, though you may have briefly seen a
progress bar.
On 02-14-21 08:33, Gamgee wrote to Vk3jed <=-
I don't think there's any need for that "-i xxxxxxxx" clause, either.
That appears to be the standard location that scp/ssh will look for the key, so it doesn't need to be mentioned. Just extra clutter.
Sysop: | Gary Ailes |
---|---|
Location: | Pittsburgh, PA |
Users: | 132 |
Nodes: | 5 (0 / 5) |
Uptime: | 109:15:49 |
Calls: | 733 |
Files: | 2,171 |
Messages: | 81,483 |