diff --git a/faculty_cli/cli.py b/faculty_cli/cli.py index 6d6c055..df91e85 100644 --- a/faculty_cli/cli.py +++ b/faculty_cli/cli.py @@ -735,6 +735,13 @@ def ssh(project, server): tablefmt="plain", ) ) + click.echo( + "\n" + + "Login to the server with:\n" + + "ssh {}@{} -p {} -o UserKnownHostsFile={} -o StrictHostKeyChecking=no".format( + details.username, details.hostname, details.port, os.devnull + ) + ) @cli.command(context_settings={"ignore_unknown_options": True}) @@ -1158,7 +1165,7 @@ def put(project, local, remote, server): "-P", str(details.port), os.path.expanduser(local), - u"{}@{}:{}".format( + "{}@{}:{}".format( details.username, details.hostname, escaped_remote ), ] @@ -1190,7 +1197,7 @@ def get(project, remote, local, server): filename, "-P", str(details.port), - u"{}@{}:{}".format( + "{}@{}:{}".format( details.username, details.hostname, escaped_remote ), os.path.expanduser(local), @@ -1210,11 +1217,11 @@ def _rsync(project, local, remote, server, rsync_opts, up): escaped_remote = faculty_cli.shell.quote(remote) if up: path_from = local - path_to = u"{}@{}:{}".format( + path_to = "{}@{}:{}".format( details.username, details.hostname, escaped_remote ) else: - path_from = u"{}@{}:{}".format( + path_from = "{}@{}:{}".format( details.username, details.hostname, escaped_remote ) path_to = local diff --git a/tox.ini b/tox.ini index 154be0e..294bfc2 100644 --- a/tox.ini +++ b/tox.ini @@ -22,3 +22,8 @@ deps = black==18.9b0 commands = black {posargs:--check setup.py faculty_cli test} + +[flake8] +# Ignore long line errors, and rely on the formatting done properly by black +# Also ignore "Line break occurred before a binary operator" also coming from black +ignore = E501,W503