I'm using MobaXterm for ssh (and X-Windows, scp/sftp depending on the server). Quite like it, but one issue I'm having when I ssh in to OpenWrt - the drag-n-drop file copy (upload / download) functionality is not working. I have tried,
However with Ubuntu 20.04 I had set up a passphrase so that various autyomated scripts that I use using rsync could copy between cloud drives and also between Ubuntu and the cloud drive shares. This was working until I upgraded, now the scripts continually ask me for my password and I can't figure out how to stop it.
How this originally came about was that I needed to be able to rsync to and from a remote location without the need for a human intervention regarding security. The instructions I was given were to use ssh-keygen to generate public/private keys and then ssh-copy-id to copy the public key to the remote host. I've just reinstalled 20.04 on another machine and used this successfully and the rsync is working without the need for a password. However if I clear the keys on the server out, reinstall 22.04 and do the same, it still prompts me for the password. I've updated my question to show the output of the commands as they are being run on Ubuntu 22.04 with the server name obscured for obvious reasons.
When you start an ssh session, MobaXterm will automatically start an sftp session with a file browser. You can double click files on the remote host and they will open if the appropriate application is found on your local computer.
For security reasons, the Hoffman2 Cluster allows file transfer only with scp or sftp or grid-ftp. For the same reason, you should use an scp or sftp client on your local machine. You should not use the scp command on the cluster.
The scp and sftp commands transfer files using the secure shell protocol (ssh) in which data is encrypted during transfer. The use of scp requires that an scp client be run on the machine that you use to initiate the transfer and that it communicate with a server run on any other machines which participate in the transfer. The Hoffman2 Cluster, like most Linux and Unix systems, runs both a client and a server.
If you experience any problems that involve endless hanging, lost connections, and/or lack of DUO pushes while attempting to transfer files, try setting the DUO_PASSCODE variable in your /.bashrc on Ookami. Our Logging In FAQ page has more information about this variable and how to set it. You can also set a default DUO device and action when logging in non-interactively (i.e. using sftp, scp, or similar software) by visiting Stony Brook's DUO self service portal.
MacOS/Linux users who access Ookami via a terminal program can transfer files back and forth using either sftp or scp command line functions. Example syntax for scp can be found here, while sftp examples can be found here. Please note that without Stony Brook's VPN, every individual scp command you run will require DUO authentication. For this reason, we recommend using scp for one time transfers of large files or directories.
(The lab machines cslab0.hws.edu, cslab1.hws.edu, ...,cslab11.hws.edu can also be used for ssh, but those computers aremore likely to be turned off or restarted without warning,which isn't nice when you are working on the computer remotely.)
You cannot use GUI program such as text editors through a normal sshconnection. For Windows, you might look at the free version of MobaXTerm,a single Windows application that integrates ssh, sftp, and other Linux utilities.Although it is a commercial program, there is a free "Home Edition." You can download the"Portable edition," which can run as an application from your home directory or even from a USB stick.You can create an "ssh session" in MobaXterm to connect to a computer, and it automatically supportsGUI programs. However, note that running GUI programs remotely over an ssh connectionmight be very slow.MobaXTerm also supports "sftp sessions" that allow you to upload and download files and even editremote files using a built-in text editor. In fact, when you open an ssh session, you get an sftpsession automatically.
You need to be working in the directory that contains the file. The ":"at the end is very important, since it is what tells the command that you are copyingto a remote computer. If you leave it out, you will simply get a copy of the file onyour own computer, named username@csfac.hws.edu. You can copy to a csfaccomputer only if you are on campus. From anywhere in the world, you can use
Although scp is useful, it's not as convenient as it could be, especiallyif you don't know the names of files on the remote computer. An alternative fortransferring files between computers is sftp. You can use sftpto connect to math.hws.edu or to any of the csfac computers.A command-line sftpsession can be started with a command such as
You might be asked to confirm that you want to connect; answer by typing the complete word yesand pressing return.After giving your Linux password, you will be able to use the commands put and get to transfer individual filesbetween the local computer and the remote computer. Use put -r and get -r to transfer entiredirectories. Thels command will list files in the current directoryon the remote computer, and the cd command can be usedto change directories on the remote computer. To list filesand change directories on the local computer, use thecommands lls and lcd. Use exit toend the sftp session. The pwd command prints the name ofthe current directory on the remote computer, and lpwd doesthe same for the local computer. (On Linux or Mac OS, seethe man page for sftp for more information.)
Really, command-line sftp is fairly fast and easy to use! However, you might prefer a GUI interface for SFTP.Various GUI programs are available for file transfer usingSFTP. A GUI interface to SFTP will usually let you see files on yourcomputer alongside files on the remote computer, and you will be able to easily copy files in either direction, such as by dragging. You cansearch for GUI SFTP programs, but do try out the command line first!
We strongly recommend your review the page on Time-based One-Time Passwords (TOTP) before you make your first attempt at connecting to Sulis. You must make your first connection to Sulis using an SSH terminal client such as OpenSSH, Putty or MobaXterm, you will be automatically disconnected if you try to make your first connection with an SFTP client such as OpenSSH sftp or WinSCP.
rsync.hpcc.msu.edu: It has access to scratch, and is dedicated to file transfer. Although this gateway is named by the popular Linux "rsync" command, it can be used for "sftp" or "scp" as well. Starting in October 2022, login to the rsync gateway will accept SSH keys as the ONLY authentication method. Username/password won't work. Please refer to the SSH key tutorial for setting up your keypair.
from a local host establishes a connection between that host and thecluster. Both hosts can be navigated. For the local file system, lcdchanges to the specified directory, lpwd prints the working directory,and lls prints a list of files in the current directory. For the remotefile system, the same three commands are available, minus the leadingl. Also available are commands to change permissions, rename files,and manipulate directories on the remote host. The two key commands areget , which copies the file in the remote working directoryto the local working directory, and put , which copies thefile in the local working directory to the remote working directory. Thequit command closes the connection between hosts.
f5d0e4f075